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