Cc: Eric Dumazet <dada1@...>, Pekka Enberg <penberg@...>, Torsten Kaiser <just.for.lkml@...>, Ingo Molnar <mingo@...>, Linus Torvalds <torvalds@...>, Linux Kernel Mailing List <linux-kernel@...>
What is the performance impact?
More comments follow...
How does the page mask work for order 1 and other higher order allocations?
This is page_address(c->page)?
page_address(c->page) + (c->freeoffset & (PAGE_MASK << s->order)) ?
store the page mask also in the kmem_cache_cpu structure?
How is this going to show up as an atomic update? You modify multiple per
cpu fields and an interrupt could happen in between.
The original code is wrong. It should be
if (is_end(c->freelist))
stat(c, DEACTIVATE_REMOTE_FREES)
That use of set_freelist is safe since interrupts are disabled. So the
function can only be used i interrupts are disabled?
How does this work? You replace the freeoffset with the the once
incremented by the object offset??? The objects may not be in sequence on
the freelist and the increment wont get you to the next object anyways
since c->offset is usually 0.
--