Re: [PATCH 2/4] mm: Send one IPI per CPU to TLB flush all entries after unmapping pages

Ingo Molnar
2015-06-11T15:02:59Z

* Mel Gorman <mgorman@suse.de> wrote:

> > In the full-flushing case (v6 without patch 4) the batching limit is
> > 'infinite', we'll batch as long as possible, right?
>
> No because we must flush before pages are freed so the maximum batching is
> related to SWAP_CLUSTER_MAX. If we free a page before the flush then in theory
> the page can be reallocated and a stale TLB entry can allow access to unrelated
> data. It would be almost impossible to trigger corruption this way but it's a
> concern.

Well, could we say double SWAP_CLUSTER_MAX to further reduce the IPI rate?

Thanks,

Ingo