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


Groups > linux.kernel > #1527222

Re: [HMM v13 06/18] mm/ZONE_DEVICE/unaddressable: add special swap for unaddressable

From Anshuman Khandual <khandual@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [HMM v13 06/18] mm/ZONE_DEVICE/unaddressable: add special swap for unaddressable
Date 2016-11-22 05:50 +0100
Message-ID <sGbbP-2qk-3@gated-at.bofh.it> (permalink)
References <sEUZr-1B7-3@gated-at.bofh.it> <sEV98-1Es-35@gated-at.bofh.it> <sFUul-7g-7@gated-at.bofh.it> <sFWcN-1f8-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 11/21/2016 06:12 PM, Jerome Glisse wrote:
> On Mon, Nov 21, 2016 at 04:28:04PM +0530, Anshuman Khandual wrote:
>> On 11/18/2016 11:48 PM, Jérôme Glisse wrote:
>>> To allow use of device un-addressable memory inside a process add a
>>> special swap type. Also add a new callback to handle page fault on
>>> such entry.
>>
>> IIUC this swap type is required only for the mirror cases and its
>> not a requirement for migration. If it's required for mirroring
>> purpose where we intercept each page fault, the commit message
>> here should clearly elaborate on that more.
> 
> It is only require for un-addressable memory. The mirroring has nothing to do
> with it. I will clarify commit message.

One thing though. I dont recall how persistent memory ZONE_DEVICE
pages are handled inside the page tables, point here is it should
be part of the same code block. We should catch that its a device
memory page and then figure out addressable or not and act
accordingly. Because persistent memory are CPU addressable, there
might not been special code block but dealing with device pages 
should be handled in a more holistic manner.

> 
> [...]
> 
>>> diff --git a/include/linux/memremap.h b/include/linux/memremap.h
>>> index b6f03e9..d584c74 100644
>>> --- a/include/linux/memremap.h
>>> +++ b/include/linux/memremap.h
>>> @@ -47,6 +47,11 @@ static inline struct vmem_altmap *to_vmem_altmap(unsigned long memmap_start)
>>>   */
>>>  struct dev_pagemap {
>>>  	void (*free_devpage)(struct page *page, void *data);
>>> +	int (*fault)(struct vm_area_struct *vma,
>>> +		     unsigned long addr,
>>> +		     struct page *page,
>>> +		     unsigned flags,
>>> +		     pmd_t *pmdp);
>>
>> We are extending the dev_pagemap once again to accommodate device driver
>> specific fault routines for these pages. Wondering if this extension and
>> the new swap type should be in the same patch.
> 
> It make sense to have it in one single patch as i also change page fault code
> path to deal with the new special swap entry and those make use of this new
> callback.
> 

Okay.

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


Thread

[HMM v13 00/18] HMM (Heterogeneous Memory Management) v13 Jérôme Glisse <jglisse@redhat.com> - 2016-11-18 18:20 +0100
  [HMM v13 13/18] mm/hmm/mirror: device page fault handler Jérôme Glisse <jglisse@redhat.com> - 2016-11-18 18:20 +0100
  [HMM v13 12/18] mm/hmm/mirror: helper to snapshot CPU page table Jérôme Glisse <jglisse@redhat.com> - 2016-11-18 18:30 +0100
  [HMM v13 02/18] mm/ZONE_DEVICE/unaddressable: add support for un-addressable device memory Jérôme Glisse <jglisse@redhat.com> - 2016-11-18 18:30 +0100
    Re: [HMM v13 02/18] mm/ZONE_DEVICE/unaddressable: add support for  un-addressable device memory Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-11-21 09:10 +0100
      Re: [HMM v13 02/18] mm/ZONE_DEVICE/unaddressable: add support for  un-addressable device memory Jerome Glisse <jglisse@redhat.com> - 2016-11-21 13:40 +0100
        Re: [HMM v13 02/18] mm/ZONE_DEVICE/unaddressable: add support for  un-addressable device memory Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-11-22 06:20 +0100
  [HMM v13 09/18] mm/hmm/mirror: mirror process address space on device with HMM helpers Jérôme Glisse <jglisse@redhat.com> - 2016-11-18 18:30 +0100
    Re: [HMM v13 09/18] mm/hmm/mirror: mirror process address space on  device with HMM helpers Balbir Singh <bsingharora@gmail.com> - 2016-11-21 03:50 +0100
      Re: [HMM v13 09/18] mm/hmm/mirror: mirror process address space on  device with HMM helpers Jerome Glisse <jglisse@redhat.com> - 2016-11-21 06:20 +0100
  [HMM v13 05/18] mm/ZONE_DEVICE/devmem_pages_remove: allow early removal of device memory Jérôme Glisse <jglisse@redhat.com> - 2016-11-18 18:30 +0100
    Re: [HMM v13 05/18] mm/ZONE_DEVICE/devmem_pages_remove: allow early  removal of device memory Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-11-21 11:40 +0100
      Re: [HMM v13 05/18] mm/ZONE_DEVICE/devmem_pages_remove: allow early  removal of device memory Jerome Glisse <jglisse@redhat.com> - 2016-11-21 13:40 +0100
        Re: [HMM v13 05/18] mm/ZONE_DEVICE/devmem_pages_remove: allow early  removal of device memory Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-11-22 06:00 +0100
  [HMM v13 04/18] mm/ZONE_DEVICE/free-page: callback when page is freed Jérôme Glisse <jglisse@redhat.com> - 2016-11-18 18:30 +0100
    Re: [HMM v13 04/18] mm/ZONE_DEVICE/free-page: callback when page is  freed Balbir Singh <bsingharora@gmail.com> - 2016-11-21 03:00 +0100
      Re: [HMM v13 04/18] mm/ZONE_DEVICE/free-page: callback when page is  freed Jerome Glisse <jglisse@redhat.com> - 2016-11-21 06:00 +0100
    Re: [HMM v13 04/18] mm/ZONE_DEVICE/free-page: callback when page is  freed Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-11-21 09:30 +0100
      Re: [HMM v13 04/18] mm/ZONE_DEVICE/free-page: callback when page is  freed Jerome Glisse <jglisse@redhat.com> - 2016-11-21 13:40 +0100
        Re: [HMM v13 04/18] mm/ZONE_DEVICE/free-page: callback when page is  freed Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-11-22 06:10 +0100
  [HMM v13 10/18] mm/hmm/mirror: add range lock helper, prevent CPU page table update for the range Jérôme Glisse <jglisse@redhat.com> - 2016-11-18 18:30 +0100
  [HMM v13 06/18] mm/ZONE_DEVICE/unaddressable: add special swap for unaddressable Jérôme Glisse <jglisse@redhat.com> - 2016-11-18 18:30 +0100
    Re: [HMM v13 06/18] mm/ZONE_DEVICE/unaddressable: add special swap  for unaddressable Balbir Singh <bsingharora@gmail.com> - 2016-11-21 03:10 +0100
      Re: [HMM v13 06/18] mm/ZONE_DEVICE/unaddressable: add special swap  for unaddressable Jerome Glisse <jglisse@redhat.com> - 2016-11-21 06:10 +0100
        Re: [HMM v13 06/18] mm/ZONE_DEVICE/unaddressable: add special swap  for unaddressable Balbir Singh <bsingharora@gmail.com> - 2016-11-22 03:30 +0100
          Re: [HMM v13 06/18] mm/ZONE_DEVICE/unaddressable: add special swap  for unaddressable Jerome Glisse <jglisse@redhat.com> - 2016-11-22 15:00 +0100
      Re: [HMM v13 06/18] mm/ZONE_DEVICE/unaddressable: add special swap  for unaddressable Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-11-21 12:20 +0100
    Re: [HMM v13 06/18] mm/ZONE_DEVICE/unaddressable: add special swap  for unaddressable Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-11-21 12:00 +0100
      Re: [HMM v13 06/18] mm/ZONE_DEVICE/unaddressable: add special swap  for unaddressable Jerome Glisse <jglisse@redhat.com> - 2016-11-21 13:50 +0100
        Re: [HMM v13 06/18] mm/ZONE_DEVICE/unaddressable: add special swap  for unaddressable Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2016-11-22 05:50 +0100
          Re: [HMM v13 06/18] mm/ZONE_DEVICE/unaddressable: add special swap  for unaddressable Jerome Glisse <jglisse@redhat.com> - 2016-11-24 15:00 +0100
  [HMM v13 11/18] mm/hmm/mirror: add range monitor helper, to monitor CPU page table update Jérôme Glisse <jglisse@redhat.com> - 2016-11-18 18:30 +0100
  Re: [HMM v13 00/18] HMM (Heterogeneous Memory Management) v13 John Hubbard <jhubbard@nvidia.com> - 2016-11-19 01:50 +0100
    Re: [HMM v13 00/18] HMM (Heterogeneous Memory Management) v13 "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> - 2016-11-19 16:00 +0100

csiph-web