From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751517AbcGFGmg (ORCPT ); Wed, 6 Jul 2016 02:42:36 -0400 Received: from out4133-34.mail.aliyun.com ([42.120.133.34]:64780 "EHLO out4133-34.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750779AbcGFGmf (ORCPT ); Wed, 6 Jul 2016 02:42:35 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e02c03282;MF=hillf.zj@alibaba-inc.com;NM=1;PH=DS;RN=3;SR=0;TI=SMTPD_----5-t8w.X_1467787336; Reply-To: "Hillf Danton" From: "Hillf Danton" To: "'Martin Schwidefsky'" Cc: "'linux-kernel'" , References: <014201d1d738$744c8f90$5ce5aeb0$@alibaba-inc.com> <014601d1d73b$5a3c0420$0eb40c60$@alibaba-inc.com> <20160706082350.5c56ca40@mschwide> In-Reply-To: <20160706082350.5c56ca40@mschwide> Subject: Re: [PATCH 2/2] s390/mm: use ipte range to invalidate multiple page table entries Date: Wed, 06 Jul 2016 14:42:16 +0800 Message-ID: <015301d1d751$8973de50$9c5b9af0$@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: AQK8Vkg+lnz5ZwkbbcG+Wzrq/undzQGSWlD2AcJ6/PmeG0x8MA== Content-Language: zh-cn Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > > > > +void ptep_invalidate_range(struct mm_struct *mm, unsigned long start, > > > + unsigned long end, pte_t *ptep) > > > +{ > > > + unsigned long nr; > > > + > > > + if (!MACHINE_HAS_IPTE_RANGE || mm_has_pgste(mm)) > > > + return; > > > + preempt_disable(); > > > + nr = (end - start) >> PAGE_SHIFT; > > > + /* If the flush is likely to be local skip the ipte range */ > > > + if (nr && !cpumask_equal(mm_cpumask(mm), > > > + cpumask_of(smp_processor_id()))) > > > > s/smp/raw_smp/ to avoid adding schedule entry with page table > > lock held? > > There can not be a schedule entry with either the page table lock held > or the preempt_disable() a few lines above. > Yes, Sir. > > > + __ptep_ipte_range(start, nr - 1, ptep); > > > + preempt_enable(); Then would you please, Sir, take a look at another case where preempt is enabled? > > > +} > > > +EXPORT_SYMBOL(ptep_invalidate_range); > > > + > > thanks Hillf