On 26.5.2016 21:21, Tejun Heo wrote:
Hello,
On Thu, May 26, 2016 at 11:19:06AM +0200, Vlastimil Babka wrote:
quoted
quoted
if (is_atomic) {
margin = 3;
if (chunk->map_alloc <
- chunk->map_used + PCPU_ATOMIC_MAP_MARGIN_LOW &&
- pcpu_async_enabled)
- schedule_work(&chunk->map_extend_work);
+ chunk->map_used + PCPU_ATOMIC_MAP_MARGIN_LOW) {
+ if (list_empty(&chunk->map_extend_list)) {
quoted
So why this list_empty condition? Doesn't it deserve a comment then? And
Because doing list_add() twice corrupts the list. I'm not sure that
deserves a comment. We can do list_move() instead but that isn't
necessarily better.
Ugh, right, somehow I thought it was testing &pcpu_map_extend_chunks.
My second question was based on the assumption that the list can have only one
item. Sorry about the noise.
quoted
isn't using a list an overkill in that case?
That would require rebalance work to scan all chunks whenever it's
scheduled and if a lot of atomic allocations are taking place, it has
some possibility to become expensive with a lot of chunks.
Thanks.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>