Re: [PATCH 3/3 v5] mm/vmalloc: Cache the vmalloc memory info

2015-08-24 Thread George Spelvin
(I hope I'm not annoying you by bikeshedding this too much, although I think this is improving.) You've sort of re-invented spinlocks, but after thinking a bit, it all works. Rather than using a single word, which is incremented to an odd number at the start of an update and an even number at

[PATCH 3/3 v5] mm/vmalloc: Cache the vmalloc memory info

2015-08-24 Thread Ingo Molnar
* Ingo Molnar wrote: > One more detail: I just realized that with the read barriers, the READ_ONCE() > accesses are not needed anymore - the barriers and the control dependencies > are > enough. > > This will further simplify the code. I.e. something like the updated patch below. (We still

Re: [PATCH 3/3 v5] mm/vmalloc: Cache the vmalloc memory info

2015-08-24 Thread George Spelvin
(I hope I'm not annoying you by bikeshedding this too much, although I think this is improving.) You've sort of re-invented spinlocks, but after thinking a bit, it all works. Rather than using a single word, which is incremented to an odd number at the start of an update and an even number at

[PATCH 3/3 v5] mm/vmalloc: Cache the vmalloc memory info

2015-08-24 Thread Ingo Molnar
* Ingo Molnar mi...@kernel.org wrote: One more detail: I just realized that with the read barriers, the READ_ONCE() accesses are not needed anymore - the barriers and the control dependencies are enough. This will further simplify the code. I.e. something like the updated patch below.