Re: [PATCH 2/4] mm: Send a single IPI to TLB flush multiple pages when unmapping

Mel Gorman
2015-04-15T22:54:35Z

On Thu, Apr 16, 2015 at 12:20:06AM +0200, Andi Kleen wrote:
>
> I did a quick read and it looks good to me.
>

Thanks. Does that also include a guarantee that a write to a clean TLB
entry will fault if the underlying PTE is unmapped?

> It's a bit ugly to bloat current with the ubc pointer,
> but i guess there's no good way around that.
>

I didn't see a better alternative.

> Also not nice to use GFP_ATOMIC for the allocation,
> but again there's no way around it and it will
> eventually recover if it fails. There may be
> a slightly better GFP flag for this situation that
> doesn't dip into the interrupt pools?
>

I can use GFP_KERNEL|__GFP_NOWARN. In the kswapd case, it's early in the
lifetime of the system so it's not going to enter direct reclaim. In the
direct reclaim path, the allocation will not recurse due to PF_MEMALLOC. It
ends up achieving the same effect without being as obvious as GFP_ATOMIC was.

--
Mel Gorman
SUSE Labs