Yasunori Goto wrote:
+ if (system_state == SYSTEM_RUNNING){
+ unsigned long queue_head_size = 1;
+ while (queue_head_size < sizeof(wait_queue_head_t))
+ queue_head_size <<= 1;
+
+ pages = (1 << (PAGE_SHIFT + 3)) / queue_head_size;
+ }
+
we have to kmalloc() wait_table after this.
I don't think we always succeed to alloc multiple contiguous pages by kmalloc().
How about allocating wait_table like this ?
==
size = 4096; /* 4096 is maximum size */
while(size) {
waittable = kmalloc(size * sizeof(wait_queue_head_t), GFP_KERNEL):
if (wait_table)
break;
size = size >> 1;
}
zone->wait_table_size = size;
zone->wait_table_bits = wait_table_bits(zone->wait_table_size);
zone->wait_table = wait_table;
==
-- Kame
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]