From: John Hubbard <jhubbard@nvidia.com>
To: Jerome Glisse <jglisse@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
David Nellans <dnellans@nvidia.com>,
Balbir Singh <balbirs@au1.ibm.com>,
Aneesh Kumar <aneesh.kumar@linux.vnet.ibm.com>,
"Paul E . McKenney" <paulmck@linux.vnet.ibm.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: [HMM-CDM 5/5] mm/hmm: simplify kconfig and enable HMM and DEVICE_PUBLIC for ppc64
Date: Wed, 14 Jun 2017 20:15:46 -0700 [thread overview]
Message-ID: <71020519-41da-242f-9ce4-ce1bd7cda879@nvidia.com> (raw)
In-Reply-To: <20170615020925.GC4666@redhat.com>
On 06/14/2017 07:09 PM, Jerome Glisse wrote:
> On Wed, Jun 14, 2017 at 04:10:32PM -0700, John Hubbard wrote:
>> On 06/14/2017 01:11 PM, Jérôme Glisse wrote:
[...]
>> Hi Jerome,
>>
>> There are still some problems with using this configuration. First and
>> foremost, it is still possible (and likely, given the complete dissimilarity
>> in naming, and difference in location on the screen) to choose HMM_MIRROR,
>> and *not* to choose either DEVICE_PRIVATE or DEVICE_PUBLIC. And then we end
>> up with a swath of important page fault handling code being ifdef'd out, and
>> one ends up having to investigate why.
>>
>> As for solutions, at least for the x86 (DEVICE_PRIVATE)case, we could do this:
>>
>> diff --git a/mm/Kconfig b/mm/Kconfig
>> index 7de939a29466..f64182d7b956 100644
>> --- a/mm/Kconfig
>> +++ b/mm/Kconfig
>> @@ -279,6 +279,7 @@ config HMM_MIRROR
>> bool "HMM mirror CPU page table into a device page table"
>> depends on ARCH_HAS_HMM && X86_64
>> select MMU_NOTIFIER
>> + select DEVICE_PRIVATE
>> select HMM
>> help
>> Select HMM_MIRROR if you want to mirror range of the CPU page table of a
>>
>> ...and that is better than the other direction (having HMM_MIRROR depend on
>> DEVICE_PRIVATE), because in the latter case, HMM_MIRROR will disappear (and
>> it's several lines above) until you select DEVICE_PRIVATE. That is hard to
>> work with for the user.
>>
>> The user will tend to select HMM_MIRROR, but it is *not* obvious that he/she
>> should also select DEVICE_PRIVATE. So Kconfig should do it for them.
>>
>> In fact, I'm not even sure if the DEVICE_PRIVATE and DEVICE_PUBLIC actually
>> need Kconfig protection, but if they don't, then life would be easier for
>> whoever is configuring their kernel.
>>
>
> We do need Kconfig for DEVICE_PRIVATE and DEVICE_PUBLIC. I can remove HMM_MIRROR
> and have HMM mirror code ifdef on DEVICE_PRIVATE.
>
> Cheers,
> Jérôme
That's probably fine.
(I see that you may have missed the rest of my response, but looks like Balbir
covered it.)
thanks,
john h
--
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-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-06-15 3:16 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-14 20:11 [HMM-CDM 0/5] Cache coherent device memory (CDM) with HMM Jérôme Glisse
2017-06-14 20:11 ` [HMM-CDM 1/5] mm/device-public-memory: device memory cache coherent with CPU Jérôme Glisse
2017-06-14 20:11 ` [HMM-CDM 2/5] mm/hmm: add new helper to hotplug CDM memory region Jérôme Glisse
2017-06-15 4:28 ` Balbir Singh
2017-06-14 20:11 ` [HMM-CDM 3/5] mm/memcontrol: allow to uncharge page without using page->lru field Jérôme Glisse
2017-06-15 3:31 ` Balbir Singh
2017-06-15 15:35 ` Jerome Glisse
2017-06-14 20:11 ` [HMM-CDM 4/5] mm/memcontrol: support MEMORY_DEVICE_PRIVATE and MEMORY_DEVICE_PUBLIC Jérôme Glisse
2017-06-15 1:41 ` Balbir Singh
2017-06-15 2:04 ` Jerome Glisse
2017-06-15 3:10 ` Balbir Singh
2017-06-14 20:11 ` [HMM-CDM 5/5] mm/hmm: simplify kconfig and enable HMM and DEVICE_PUBLIC for ppc64 Jérôme Glisse
2017-06-14 23:10 ` John Hubbard
2017-06-15 2:09 ` Jerome Glisse
2017-06-15 3:15 ` John Hubbard [this message]
2017-06-15 1:46 ` Balbir Singh
2017-06-15 2:07 ` Jerome Glisse
2017-06-15 2:59 ` Balbir Singh
2017-06-14 21:20 ` [HMM-CDM 0/5] Cache coherent device memory (CDM) with HMM Dave Hansen
2017-06-14 21:38 ` Jerome Glisse
2017-06-14 21:58 ` Dave Hansen
2017-06-14 22:07 ` Benjamin Herrenschmidt
2017-06-14 23:40 ` Balbir Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=71020519-41da-242f-9ce4-ce1bd7cda879@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=balbirs@au1.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=dnellans@nvidia.com \
--cc=jglisse@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=paulmck@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox