From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752284AbbJWDXn (ORCPT ); Thu, 22 Oct 2015 23:23:43 -0400 Received: from out4133-2.mail.aliyun.com ([42.120.133.2]:65024 "EHLO out4133-2.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751807AbbJWDXl (ORCPT ); Thu, 22 Oct 2015 23:23:41 -0400 X-Greylist: delayed 72874 seconds by postgrey-1.27 at vger.kernel.org; Thu, 22 Oct 2015 23:23:41 EDT X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R621e4;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e02c03306;MF=hillf.zj@alibaba-inc.com;NM=1;PH=DS;RN=3;SR=0; Reply-To: "Hillf Danton" From: "Hillf Danton" To: "'Jerome Glisse'" Cc: , "'linux-kernel'" References: <05ec01d10c9b$4df7ba80$e9e72f80$@alibaba-inc.com> <05f501d10c9e$a8562900$f9027b00$@alibaba-inc.com> <20151022142144.GB2914@redhat.com> In-Reply-To: <20151022142144.GB2914@redhat.com> Subject: Re: [PATCH v11 02/14] HMM: add special swap filetype for memory migrated to device v2. Date: Fri, 23 Oct 2015 11:23:26 +0800 Message-ID: <070501d10d42$2ec35190$8c49f4b0$@alibaba-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQJtveJn7Me3t7mrXRTNXgiwOBLZcwEkpmJcApsPDfqdIQTVoA== Content-Language: zh-cn Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > + if (cnt_hmm_entry) { > > > + int ret; > > > + > > > + ret = hmm_mm_fork(src_mm, dst_mm, dst_vma, > > > + dst_pmd, start, end); > > > > Given start, s/end/addr/, no? > > No, end is the right upper limit here. > Then in the first loop, hmm_mm_fork is invoked for the _entire_ range, from input addr to end. In subsequent loops(if necessary), start is updated to addr, and hmm_mm_fork is also invoked for remaining range, from start to end. Is the above overlap in range making sense? Hillf