From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752444AbdGRVlD convert rfc822-to-8bit (ORCPT ); Tue, 18 Jul 2017 17:41:03 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:17914 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751470AbdGRVlC (ORCPT ); Tue, 18 Jul 2017 17:41:02 -0400 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 18 Jul 2017 14:41:02 -0700 Subject: Re: [PATCH 09/15] mm/hmm/devmem: device memory hotplug using ZONE_DEVICE v6 To: =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , , , CC: John Hubbard , Dan Williams , David Nellans , Mark Hairgrove , Sherry Cheung , Subhash Gutti References: <20170628180047.5386-1-jglisse@redhat.com> <20170628180047.5386-10-jglisse@redhat.com> From: Evgeny Baskakov Message-ID: Date: Tue, 18 Jul 2017 14:41:01 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170628180047.5386-10-jglisse@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8BIT Content-Language: en-US X-Originating-IP: [172.18.168.154] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL103.nvidia.com (172.20.187.11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/28/17 11:00 AM, Jérôme Glisse wrote: > +/* > + * struct hmm_devmem_ops - callback for ZONE_DEVICE memory events > + * > + * @free: call when refcount on page reach 1 and thus is no longer use > + * @fault: call when there is a page fault to unaddressable memory > + */ > +struct hmm_devmem_ops { > + void (*free)(struct hmm_devmem *devmem, struct page *page); > + int (*fault)(struct hmm_devmem *devmem, > + struct vm_area_struct *vma, > + unsigned long addr, > + struct page *page, > + unsigned int flags, > + pmd_t *pmdp); > +}; > Hi Jerome, As discussed, could you please add detailed documentation for these callbacks? Specifically, for the 'fault' callback it is important to clarify the meaning of each of its parameters and the return value (which error codes are expected to be returned from it). Thanks! -- Evgeny Baskakov NVIDIA From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f70.google.com (mail-pg0-f70.google.com [74.125.83.70]) by kanga.kvack.org (Postfix) with ESMTP id A051C6B0292 for ; Tue, 18 Jul 2017 17:41:03 -0400 (EDT) Received: by mail-pg0-f70.google.com with SMTP id u5so33630809pgq.14 for ; Tue, 18 Jul 2017 14:41:03 -0700 (PDT) Received: from hqemgate16.nvidia.com (hqemgate16.nvidia.com. [216.228.121.65]) by mx.google.com with ESMTPS id f13si2493921pln.475.2017.07.18.14.41.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Jul 2017 14:41:02 -0700 (PDT) Subject: Re: [PATCH 09/15] mm/hmm/devmem: device memory hotplug using ZONE_DEVICE v6 References: <20170628180047.5386-1-jglisse@redhat.com> <20170628180047.5386-10-jglisse@redhat.com> From: Evgeny Baskakov Message-ID: Date: Tue, 18 Jul 2017 14:41:01 -0700 MIME-Version: 1.0 In-Reply-To: <20170628180047.5386-10-jglisse@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US Sender: owner-linux-mm@kvack.org List-ID: To: =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: John Hubbard , Dan Williams , David Nellans , Mark Hairgrove , Sherry Cheung , Subhash Gutti On 6/28/17 11:00 AM, J=C3=A9r=C3=B4me Glisse wrote: > +/* > + * struct hmm_devmem_ops - callback for ZONE_DEVICE memory events > + * > + * @free: call when refcount on page reach 1 and thus is no longer use > + * @fault: call when there is a page fault to unaddressable memory > + */ > +struct hmm_devmem_ops { > + void (*free)(struct hmm_devmem *devmem, struct page *page); > + int (*fault)(struct hmm_devmem *devmem, > + struct vm_area_struct *vma, > + unsigned long addr, > + struct page *page, > + unsigned int flags, > + pmd_t *pmdp); > +}; > Hi Jerome, As discussed, could you please add detailed documentation for these=20 callbacks? Specifically, for the 'fault' callback it is important to clarify the=20 meaning of each of its parameters and the return value (which error=20 codes are expected to be returned from it). Thanks! --=20 Evgeny Baskakov NVIDIA -- 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: email@kvack.org