Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1666429

Re: [HMM-CDM 5/5] mm/hmm: simplify kconfig and enable HMM and DEVICE_PUBLIC for ppc64

From John Hubbard <jhubbard@nvidia.com>
Newsgroups linux.kernel
Subject Re: [HMM-CDM 5/5] mm/hmm: simplify kconfig and enable HMM and DEVICE_PUBLIC for ppc64
Date 2017-06-15 05:20 +0200
Message-ID <tStua-5uX-9@gated-at.bofh.it> (permalink)
References <tSmVH-1k9-3@gated-at.bofh.it> <tSmVH-1k9-5@gated-at.bofh.it> <tSpJU-37v-17@gated-at.bofh.it> <tSsoq-4ML-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[HMM-CDM 5/5] mm/hmm: simplify kconfig and enable HMM and DEVICE_PUBLIC for ppc64 Jérôme Glisse <jglisse@redhat.com> - 2017-06-14 22:20 +0200
  Re: [HMM-CDM 5/5] mm/hmm: simplify kconfig and enable HMM and  DEVICE_PUBLIC for ppc64 John Hubbard <jhubbard@nvidia.com> - 2017-06-15 01:20 +0200
    Re: [HMM-CDM 5/5] mm/hmm: simplify kconfig and enable HMM and  DEVICE_PUBLIC for ppc64 Jerome Glisse <jglisse@redhat.com> - 2017-06-15 04:10 +0200
      Re: [HMM-CDM 5/5] mm/hmm: simplify kconfig and enable HMM and  DEVICE_PUBLIC for ppc64 John Hubbard <jhubbard@nvidia.com> - 2017-06-15 05:20 +0200
  Re: [HMM-CDM 5/5] mm/hmm: simplify kconfig and enable HMM and  DEVICE_PUBLIC for ppc64 Balbir Singh <bsingharora@gmail.com> - 2017-06-15 04:00 +0200
    Re: [HMM-CDM 5/5] mm/hmm: simplify kconfig and enable HMM and  DEVICE_PUBLIC for ppc64 Jerome Glisse <jglisse@redhat.com> - 2017-06-15 04:10 +0200
      Re: [HMM-CDM 5/5] mm/hmm: simplify kconfig and enable HMM and  DEVICE_PUBLIC for ppc64 Balbir Singh <bsingharora@gmail.com> - 2017-06-15 05:10 +0200

csiph-web