From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161773AbcEaDxK (ORCPT ); Mon, 30 May 2016 23:53:10 -0400 Received: from out4133-130.mail.aliyun.com ([42.120.133.130]:51649 "EHLO out4133-130.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933104AbcEaDxH (ORCPT ); Mon, 30 May 2016 23:53:07 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e02c03283;MF=hillf.zj@alibaba-inc.com;NM=1;PH=DS;RN=3;SR=0;TI=SMTPD_----4s9fhEP_1464666768; Reply-To: "Hillf Danton" From: "Hillf Danton" To: "'Aneesh Kumar K.V'" Cc: "'linux-kernel'" , References: <001701d1ba44$b9c0d560$2d428020$@alibaba-inc.com> <001901d1ba4a$514eccc0$f3ec6640$@alibaba-inc.com> <87mvn71rwc.fsf@skywalker.in.ibm.com> In-Reply-To: <87mvn71rwc.fsf@skywalker.in.ibm.com> Subject: Re: [RFC PATCH 2/4] mm: Change the interface for __tlb_remove_page Date: Tue, 31 May 2016 11:52:48 +0800 Message-ID: <002b01d1baef$e6246530$b26d2f90$@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: AQHCUcxPez5cCjoFblCkJXAnnBBTsQHvpvdgApv0A3SfzNxMgA== Content-Language: zh-cn Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > >> @@ -1202,7 +1205,12 @@ again: > >> if (force_flush) { > >> force_flush = 0; > >> tlb_flush_mmu_free(tlb); > >> - > >> + if (pending_page) { > >> + /* remove the page with new size */ > >> + __tlb_adjust_range(tlb, tlb->addr); > > > > Would you please specify why tlb->addr is used here? > > > > That is needed because tlb_flush_mmu_tlbonly() does a __tlb_reset_range(). > If ->addr is updated in resetting, then it is a noop here to deliver tlb->addr to __tlb_adjust_range(). On the other hand, if ->addr is not updated in resetting, then it is also a noop here. Do you want to update ->addr here? thanks Hillf