malloc memory region descriptors

2010-08-16 Thread Prabhu nath
Dear All, In linux kernel, for all memory allocation done by *vmalloc*, kernel maintains memory region descriptor *(vm_struct)* which stores information about the linear virtual address range, no. of physical page frames allocated... as a linked list headed by *vmlist *symbol. Can you

Re: unconsistency of state of irq

2010-08-16 Thread Pei Lin
2010/8/15 Parmenides mobile.parmeni...@gmail.com: Hi,   For each irq descriptor, there is a state bit IRQ_DISABLED indicating whether corresponding IRQ is masked. But, when checking the source code, I find that the function mask_and_ack_8259A(), which is responsible for acknowledge the PIC

Re:

2010-08-16 Thread Tejas Upadhyay
On Mon, Aug 16, 2010 at 2:46 PM, Tejas Upadhyay upadhya...@gmail.comwrote:

Re: malloc memory region descriptors

2010-08-16 Thread Venkatram Tummala
On Mon, Aug 16, 2010 at 1:00 AM, Prabhu nath gprabhun...@gmail.com wrote: Dear All, *I understand that kernel maintains a descriptor (*vm_area_struct*) per application to hold information about the virtual address space allocated for the heap region.* Not entirely true. the linux

Re: malloc memory region descriptors

2010-08-16 Thread Prabhu nath
On Mon, Aug 16, 2010 at 1:30 PM, Prabhu nath gprabhun...@gmail.com wrote: Dear All, In linux kernel, for all memory allocation done by *vmalloc*, kernel maintains memory region descriptor *(vm_struct)* which stores information about the linear virtual address range, no. of physical

Re: malloc memory region descriptors

2010-08-16 Thread Guillaume Knispel
On Mon, 16 Aug 2010 16:40:20 +0530 Prabhu nath gprabhun...@gmail.com wrote: On Mon, Aug 16, 2010 at 1:30 PM, Prabhu nath gprabhun...@gmail.com wrote: Dear All, In linux kernel, for all memory allocation done by *vmalloc*, kernel maintains memory region descriptor

Why the size of pid hash tables depends on the size of RAM?

2010-08-16 Thread Adam Jiang
Hello list, In Understanding the Linux kernel book, it was said that the size of pid hash table depends on the size of RAM; for example, for the systems having 512MB of RAM, each hash table is stored in 4 page frames and includes 2,048 entries. How is the size of pid hash table determined? I

Re: malloc memory region descriptors

2010-08-16 Thread Mulyadi Santosa
On Mon, Aug 16, 2010 at 15:00, Prabhu nath gprabhun...@gmail.com wrote: Dear All,   In linux kernel, for all memory allocation done by vmalloc, kernel maintains memory region descriptor (vm_struct) which stores information about the linear virtual address range, no. of physical page

Re: why is it necessary that irqs are disabled to preempt?

2010-08-16 Thread Rik van Riel
On 08/16/2010 03:48 AM, Parmenides wrote: if (!current_thread_info-preempt_count !irqs_disabled()) { current_thread_info-preempt_count = PREEMPT_ACTIVE; schedule(); current_thread_info-preempt_count = 0; } The if statement checks whether irqs are enabled.

Re: why is it necessary that irqs are disabled to preempt?

2010-08-16 Thread Mulyadi Santosa
On Mon, Aug 16, 2010 at 14:48, Parmenides mobile.parmeni...@gmail.com wrote: The if statement checks whether irqs are enabled. If so, the preemption will be carried out. I wonder why this check is necessary. Why preemption is prohibited with irqs disabled? Because that likely means we are

Re: malloc memory region descriptors

2010-08-16 Thread Venkatram Tummala
On Mon, Aug 16, 2010 at 4:10 AM, Prabhu nath gprabhun...@gmail.com wrote: On Mon, Aug 16, 2010 at 1:30 PM, Prabhu nath gprabhun...@gmail.comwrote: Dear All, In linux kernel, for all memory allocation done by *vmalloc*, kernel maintains memory region descriptor *(vm_struct)*

Re: How create a miscellaneous crw-rw-rw- device ?

2010-08-16 Thread Dave Hylands
HI Stephan, So you'll  either need to modify your global umask, or add a udev rule for your driver  which explicitly sets the mode. I use to build under my nonpriv-account but I need the root to insmod/rmmod. The root account has a standard umask of 0022. This is:          umask -S

Re: why is it necessary that irqs are disabled to preempt?

2010-08-16 Thread Kaustubh Ashtekar
On Mon, Aug 16, 2010 at 8:49 PM, Rik van Riel r...@nl.linux.org wrote: On 08/16/2010 03:48 AM, Parmenides wrote:     if (!current_thread_info-preempt_count  !irqs_disabled()) {         current_thread_info-preempt_count = PREEMPT_ACTIVE;         schedule();