[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <abc1d8b7-cde0-ac40-6664-c10694666659@intel.com>
Date: Tue, 31 Jan 2017 09:54:02 -0800
From: Dave Hansen <dave.hansen@...el.com>
To: Anshuman Khandual <khandual@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Cc: mhocko@...e.com, vbabka@...e.cz, mgorman@...e.de,
minchan@...nel.org, aneesh.kumar@...ux.vnet.ibm.com,
bsingharora@...il.com, srikar@...ux.vnet.ibm.com,
haren@...ux.vnet.ibm.com, jglisse@...hat.com,
dan.j.williams@...el.com
Subject: Re: [RFC V2 11/12] mm: Tag VMA with VM_CDM flag during page fault
On 01/30/2017 09:10 PM, Anshuman Khandual wrote:
>> This is happening with mmap_sem held for read. Correct? Is it OK that
>> you're modifying the VMA? That vm_flags manipulation is non-atomic, so
>> how can that even be safe?
> Hmm. should it be done with mmap_sem being held for write. Will look
> into this further. But intercepting the page faults inside alloc_pages_vma()
> for tagging the VMA is okay from over all design perspective ?. Or this
> should be moved up or down the call chain in the page fault path ?
Doing it in the fault path seems wrong to me.
Apps have to take *explicit* action to go and get access to device
memory. It seems like we should mark the VMA *then*, at the time of the
explicit action. I also think _implying_ that we want KSM, etc...
turned off just because of the target of an mbind() is a bad idea. Apps
have to ask for this stuff *explicitly*, so why not also have them turn
KSM off explicitly?
Powered by blists - more mailing lists