Kmalloc while holding a spinlock

2009-09-29 Thread Leonidas .
Hi List, I need to do lot of small allocations (around 70-80 bytes) from a critical region while holding a spinlock. Total number of such allocation could go upto tens of thousands in few hours. So all these allocations use GFP_ATOMIC flag instead of GFP_KERNEL. As per my understanding,

Re: Kmalloc while holding a spinlock

2009-09-29 Thread askb
I need to do lot of small allocations (around 70-80 bytes) from a critical region while holding a spinlock. Total number of such allocation could go upto tens of thousands in few hours. So all these allocations use GFP_ATOMIC flag instead of GFP_KERNEL. As per my understanding, GFP_ATOMIC

retain mounted initrd after booting?

2009-09-29 Thread Robert P. J. Day
i'm still looking for how to keep the initrd mounted after booting on my x86_64 system. can't you do that anymore? it's been a while since i tried that, and i thought the kernel parm retain_initrd would do it, and leave it mounted at /initrd. apparently not. am i misremembering? is there a

different processes using same file object

2009-09-29 Thread krushnaal pai
i have 2 completely different processes A and B (they do not have any relationship) suppose A opens a file with file descriptor 4 and B opens another file with file descriptor 5 can process A use the fd 5 (i.e using the file object of processs B) by any means.. if suppose i let the fd 4 of

Re: different processes using same file object

2009-09-29 Thread Daniel Baluta
On Tue, Sep 29, 2009 at 11:50 AM, krushnaal pai krisonea...@gmail.com wrote: i have 2 completely different processes A and B (they do not have any relationship) suppose A opens a file with file descriptor 4 and B opens another file with file descriptor 5 can process A use the fd 5 (i.e

Re: Kmalloc while holding a spinlock

2009-09-29 Thread Leonidas .
On Tue, Sep 29, 2009 at 1:06 PM, askb ask...@gmail.com wrote: I need to do lot of small allocations (around 70-80 bytes) from a critical region while holding a spinlock. Total number of such allocation could go upto tens of thousands in few hours. So all these allocations use GFP_ATOMIC

Re: buffer and page retrievel

2009-09-29 Thread Mulyadi Santosa
On Mon, Sep 28, 2009 at 10:58 PM, Shameem Ahamed shameem.aha...@yahoo.com wrote: Thanks for the clarification. If the buffer and page cache are unified, what is lru ?.  Is it part of the cpu cache, or part of the buffer ?. Shameem Please don't do top posting... AFAIK, LRU is a separate

Re: retain mounted initrd after booting?

2009-09-29 Thread Luciano Rocha
On Tue, Sep 29, 2009 at 04:39:48AM -0400, Robert P. J. Day wrote: i'm still looking for how to keep the initrd mounted after booting on my x86_64 system. can't you do that anymore? it's been a while since i tried that, and i thought the kernel parm retain_initrd would do it, and leave it

Re: different processes using same file object

2009-09-29 Thread Luciano Rocha
On Tue, Sep 29, 2009 at 02:20:00PM +0530, krushnaal pai wrote: i have 2 completely different processes A and B (they do not have any relationship) suppose A opens a file with file descriptor 4 and B opens another file with file descriptor 5 can process A use the fd 5 (i.e using the file

Re: Ioctls for data transfer

2009-09-29 Thread Nagaprabhanjan Bellari
If you take /proc filesystem for example, you can write something to it and can read something from it depending on what you last wrote. -nagp On Fri, Sep 18, 2009 at 9:46 PM, Peter Teoh htmldevelo...@gmail.com wrote: On Fri, Sep 18, 2009 at 9:07 PM, Leonidas . leonidas...@gmail.com wrote:

Re: Ioctls for data transfer

2009-09-29 Thread Leonidas .
On Tue, Sep 29, 2009 at 3:31 PM, Nagaprabhanjan Bellari nagp@gmail.comwrote: If you take /proc filesystem for example, you can write something to it and can read something from it depending on what you last wrote. -nagp On Fri, Sep 18, 2009 at 9:46 PM, Peter Teoh

Re: retain mounted initrd after booting?

2009-09-29 Thread Luciano Rocha
On Tue, Sep 29, 2009 at 05:34:58AM -0400, Robert P. J. Day wrote: On Tue, 29 Sep 2009, Luciano Rocha wrote: On Tue, Sep 29, 2009 at 04:39:48AM -0400, Robert P. J. Day wrote: i'm still looking for how to keep the initrd mounted after booting on my x86_64 system. can't you do that

Re: ext3 data=journal?

2009-09-29 Thread Peter Teoh
On Tue, Sep 29, 2009 at 2:51 AM, Venkatesh Srinivas m...@acm.jhu.edu wrote: Hi, Thanks for the reply! I was looking for more information on data=journal, not data=ordered or data=writeback; I didn't see comments on it on the ext wiki page, or two of the three links. Do you know anyplace I

Re: different processes using same file object

2009-09-29 Thread krushnaal pai
even if process A does recv the file descriptions thru sockets how will it use the file object of process B? On Tue, Sep 29, 2009 at 2:58 PM, Luciano Rocha luci...@eurotux.com wrote: On Tue, Sep 29, 2009 at 02:20:00PM +0530, krushnaal pai wrote: i have 2 completely different processes A and B

Re: retain mounted initrd after booting?

2009-09-29 Thread Robert P. J. Day
On Tue, 29 Sep 2009, Luciano Rocha wrote: The initrd option in grub, and the similar one in other boot loaders, passes a binary image to the kernel. Then the kernel identifies it as an initramfs or as an initrd. When the kernel boots, you can see this message: Trying to unpack rootfs

Re: Ioctls for data transfer

2009-09-29 Thread Nagaprabhanjan Bellari
On Tue, Sep 29, 2009 at 3:34 PM, Leonidas . leonidas...@gmail.com wrote: On Tue, Sep 29, 2009 at 3:31 PM, Nagaprabhanjan Bellari nagp@gmail.com wrote: If you take /proc filesystem for example, you can write something to it and can read something from it depending on what you last

Re: ext3 data=journal?

2009-09-29 Thread Peter Teoh
On Tue, Sep 29, 2009 at 6:17 AM, Peter Teoh htmldevelo...@gmail.com wrote: On Tue, Sep 29, 2009 at 2:51 AM, Venkatesh Srinivas m...@acm.jhu.edu wrote: Hi, Thanks for the reply! I was looking for more information on data=journal, not data=ordered or data=writeback; I didn't see comments on

Re: retain mounted initrd after booting?

2009-09-29 Thread Luciano Rocha
On Tue, Sep 29, 2009 at 06:23:39AM -0400, Robert P. J. Day wrote: i only have a few minutes to reply to this, but i think you're oversimplifying. there are two possible early root filesystems: 1) the *internal* initramfs 2) the *external* initrd image if you check the source in the

Re: different processes using same file object

2009-09-29 Thread Luciano Rocha
On Tue, Sep 29, 2009 at 03:48:48PM +0530, krushnaal pai wrote: even if process A does recv the file descriptions thru sockets how will it use the file object of process B? What do you mean? A file descriptor is a pointer to the kernel's file object. If you send a file descriptor from process A

Re: different processes using same file object

2009-09-29 Thread krushnaal pai
there are 2 completely different processes A and B process A opens a file with fd 4 then i change the 'fs' and 'files' fields of the process descriptor of proc B to point to the respective fields of proc A ( i.e i let proc B share the 2 tables from proc A) then proc B opens a file with fd 5 then

Re: different processes using same file object

2009-09-29 Thread Luciano Rocha
On Tue, Sep 29, 2009 at 04:45:28PM +0530, krushnaal pai wrote: each process has its own 'fd' array isnt it? What fd array?... so a fd coming from another process doesnt make sense to the running process Why not? The file descriptor is just an integer. What the kernel does with it is its

Re: different processes using same file object

2009-09-29 Thread Luciano Rocha
Krushnaal Pai informed me that he's trying to do this inside the kernel. That's beyond my expertise... -- Luciano Rocha luci...@eurotux.com Eurotux Informática, S.A. http://www.eurotux.com/ pgpiIvahzYsWP.pgp Description: PGP signature

RE: interrupt/tasklet issue in custom driver on recent kernels

2009-09-29 Thread Kodel Oleg
Hi all. On the powerpc arch, there is no ioremap_cache() version. Could someone to explain why? Thanks -Original Message- From: kernelnewbies-bou...@nl.linux.org [mailto:kernelnewbies-bou...@nl.linux.org] On Behalf Of Jason Nymble Sent: Friday, September 25, 2009 6:24 PM To:

Query on linux PCI

2009-09-29 Thread Rajesh
Hi All, I am a new to linux programming. I am currently working PCI based target, which consists of a CPU soft-core with kernel version 2.6, DDR2 memory and DMA controller. I need to write an application on target to transfer data from target DDR2 to host system memory, using target's DMA. How

Re: retain mounted initrd after booting?

2009-09-29 Thread Robert P. J. Day
On Tue, 29 Sep 2009, Luciano Rocha wrote: On Tue, Sep 29, 2009 at 06:23:39AM -0400, Robert P. J. Day wrote: the kernel clearly defines the retain_initrd kernel parameter, so i'm just curious as to its purpose. To preserve initrds. That is, filesystem images passed as an initrd that the

max throughput achievable with outb()

2009-09-29 Thread Michal Ludvig
Hi all, I've got a digital IO card hanging off an ISA bus in PC/104 system. I'm pushing data packets to it, usually 16-32 bytes per transfer, 100x per second. Apparently ISA bus clock is supposed to run at 8MHz and I expected to achieve somewhat close-to-that performance with my driver. To test

development/hacking environment reg.

2009-09-29 Thread Anand Arumugam
hi all, i just started learning about linux kernel hacking. pardon me if this question was already asked. if yes, please point me to the archived mail on this subject. question: as of now, i have only one pc (dell dimension 3000). i've dual booted it with windows. in the kernelnewbies faqs i

KHz representation in Linux kernel

2009-09-29 Thread Shankar Ganesh
Hi all, In linux kernel, all the places i found ,for ex 32KHz clock is represented as 32768 Hz, not as 32 x 1000 Hz . Could you please help to understand why 2 ^ x is used instead of 10 ^ y ? Regards, Shankar

Re: development/hacking environment reg.

2009-09-29 Thread Michal Ludvig
Anand Arumugam wrote: what is the normal environment that is used by most of the kernel hackers and developers? do they have a dedicated pc for this work and have a separate pc for other uses? or just create a partition in the hard drive and use this partition for kernel related development?