Re: [PATCH v3 (re-send)] xen/gntdev: Use mempolicy instead of VM_IO flag to avoid NUMA balancing

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

 



On Fri, 18 Nov 2016, Boris Ostrovsky wrote:
> On 11/18/2016 05:27 PM, Hugh Dickins wrote:
> > On Fri, 18 Nov 2016, Boris Ostrovsky wrote:
> >> On 11/18/2016 04:51 PM, Hugh Dickins wrote:
> >>> Hmm, sorry, but this seems overcomplicated to me: ingenious, but an
> >>> unusual use of the ->get_policy method, which is a little worrying,
> >>> since it has only been used for shmem (+ shm and kernfs) until now.
> >>>
> >>> Maybe I'm wrong, but wouldn't substituting VM_MIXEDMAP for VM_IO
> >>> solve the problem more simply?
> >> It would indeed. I didn't want to use it because it has specific meaning
> >> ("Can contain "struct page" and pure PFN pages") and that didn't seem
> >> like the right flag to describe this vma.
> > It is okay if it contains 0 pure PFN pages; and no worse than VM_IO was.
> > A comment on why VM_MIXEDMAP is being used there would certainly be good.
> > But I do find its use preferable to enlisting an unusual ->get_policy.
> 
> OK, I'll set VM_MIXEDMAP then.

Thanks, if it accomplishes what you need, then please do use it.

> 
> I am still curious though why you feel get_policy is not appropriate
> here (beside the fact that so far it had limited use). It is essentially
> trying to say that the only policy to be consulted (in vma_policy_mof())
> is of the vma itself and not of the task.

I agree that get_policy is explicitly about NUMA, and so relevant to the
matter of (discouraging) NUMA balancing, without any apology needed.

But there are no other examples of its use that way, it's been something
private to shmem (hence shm and kernfs) up until now: the complement of
set_policy, which implements the mbind() syscall on shmem objects.

Introduce an exceptional new usage, and we're likely to introduce bugs
(not to mention the long history of bugs in mpol_dup() that you also use).
Perhaps I'd find one already if I took the time to study your patch.

Full disclosure: I'm also contemplating a change to its interface,
to handle a possible NUMA interleave issue, so I do need to keep
an eye on all its callers.

If we have to choose between two less-than-ideal solutions,
please let's choose the simplest.

Hugh

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]