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

Re: sys_exit() and zap_page_range()



Philipp Rumpf wrote:
> 

Hi, Philipp.

> Here's a simple way:

Already done it :)  It's apparent that not _all_ callers of z_p_r need
this treatment, so I've added an extra 'do_reschedule' flag.  I've also
moved the TLB flushing into this function.

It strikes me that the TLB flush race can be avoided by simply deferring
the actual free_page until _after_ the flush.  So
free_page_and_swap_cache simply appends them to a passed-in list rather
than returning them to the buddy allocator.  zap_page_range can then
free the pages after the flush.

What am I missing???

 
> [PAGE_SIZE*4 is low, I suspect.]

zap_page_range zaps 1000 pages per millisecond, so I'm doing 1000 at a
time.

> For a clean solution, what I would love zap_page_range to look like is:

I'll look at it, but I'm not an MM guy....
--
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.eu.org/Linux-MM/