Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Vivek Goyal <vgoyal@...>
Cc: <linux-kernel@...>, <kexec@...>, <akpm@...>, <ak@...>
Date: Wednesday, October 17, 2007 - 7:36 am

* Vivek Goyal <vgoyal@in.ibm.com> [2007-10-17 13:05]:

Unfortunately, that's not possible without using a lock (or counters
instead of a bitmap) any more. If we just do

	for (i--; i >= sidx; i--)
		clear_bit(i, bdata->node_bootmem_map);

then another thread of execution could reserve the memory (without
BOOTMEM_EXCLUSIVE) in between -- and the code would free the memory
which is already reserved.

I think that could be modelled with a rwlock, not changing the default
case where BOOTMEM_EXCLUSIVE is not specified.


Thanks,
   Bernhard
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 2/3] Introduce BOOTMEM_EXCLUSIVE, Bernhard Walle, (Tue Oct 16, 12:28 pm)
Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE, Vivek Goyal, (Wed Oct 17, 7:05 am)
Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE, Bernhard Walle, (Thu Oct 18, 7:15 am)
Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE, Bernhard Walle, (Wed Oct 17, 7:36 am)
Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE, Vivek Goyal, (Thu Oct 18, 12:32 am)
Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE, Dave Hansen, (Tue Oct 16, 2:08 pm)
Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE, Bernhard Walle, (Tue Oct 16, 2:44 pm)
Re: [patch 2/3] Introduce BOOTMEM_EXCLUSIVE, Dave Hansen, (Tue Oct 16, 2:58 pm)