RE: [Patch] Move swiotlb_init early on X86_64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>-----Original Message-----
>>From: [email protected] [mailto:[email protected]] On Behalf Of Zou Nan hai
>>Sent: 2006年3月2日 12:33
>>
>>Really, then how about the following patch?
>>
>>Let normal bootmem allocator go above 4G first.
>>This will save more memory with address less than 4G.
>>
>>Signed-off-by: Zou Nan hai <[email protected]>
>>
>>--- linux-2.6.16-rc5/mm/bootmem.c	2006-03-03 08:31:52.000000000 +0800
>>+++ b/mm/bootmem.c	2006-03-03 09:05:17.000000000 +0800
>>@@ -381,16 +381,24 @@ unsigned long __init free_all_bootmem (v
>> 	return(free_all_bootmem_core(NODE_DATA(0)));
>> }
>>
>>+#define LOW32LIMIT 0xffffffff
>>+
>> void * __init __alloc_bootmem(unsigned long size, unsigned long align, unsigned long goal)
>> {
>> 	pg_data_t *pgdat = pgdat_list;
>> 	void *ptr;
>>
>>+	if (goal < LOW32LIMIT) {
On i386, above is always true.


>>+		for_each_pgdat(pgdat)
>>+			if ((ptr = __alloc_bootmem_core(pgdat->bdata, size,
>>+						 align, LOW32LIMIT, 0)))
>>+			return(ptr);
>>+	}
-
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]
  Powered by Linux