From patchwork Tue Nov 6 13:47:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Christopherson X-Patchwork-Id: 10670443 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C5A4F15E9 for ; Tue, 6 Nov 2018 13:47:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B71EB2A3F6 for ; Tue, 6 Nov 2018 13:47:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A974A2A3FB; Tue, 6 Nov 2018 13:47:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.4 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,SUBJ_OBFU_PUNCT_FEW,SUBJ_OBFU_PUNCT_MANY autolearn=no version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51DE32A3F6 for ; Tue, 6 Nov 2018 13:47:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 367F66B0005; Tue, 6 Nov 2018 08:47:33 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 2EDF76B032D; Tue, 6 Nov 2018 08:47:33 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1B8756B032E; Tue, 6 Nov 2018 08:47:33 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by kanga.kvack.org (Postfix) with ESMTP id CB0766B0005 for ; Tue, 6 Nov 2018 08:47:32 -0500 (EST) Received: by mail-pf1-f200.google.com with SMTP id j9-v6so12464580pfn.20 for ; Tue, 06 Nov 2018 05:47:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:mime-version:content-transfer-encoding; bh=sK6uVn3znqbDQsd+BAdMg1vx0CxsqEdbF7HZ8JITHv4=; b=WcDNF1GU3RbmFhgdq0CavI6xpL9rqP4UjNtfMIUBsUcGRQD3OfD/lzp6QkQjCsI8tB 0NaPVSjzZlbrbWOftnSGgKpqzIw8lnAUikvegbcsjOlCti6sPS8vlKL8Klpa5br8gkf7 SbJ4OaafoBdPR59bYBMgZxtGbDh6k423VqGd7PmXoUXmVqNJ1TFhV9XhHtY1y2xlzMQx THNQF47ug0zvolhyJWHtT8qWCaIEFRLILzW664DjXWt6cTpzbjl91bbmlPF82mhUezH2 5SbUiTSpOYFTkxFQbxz1RTyCsX4tFDjlSq9pqobDyIDIqha5baexSBW/ch5jZQTiLV47 r/Cg== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of sean.j.christopherson@intel.com designates 192.55.52.88 as permitted sender) smtp.mailfrom=sean.j.christopherson@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Gm-Message-State: AGRZ1gIgOKQZwk3tTGuqKizepOmPNV0gUvc7uts7LE3dPV7THcHWwcWc z5fNhdFtv1M/WQLq/160bbUg1Bp8zPSlfq38xeN5R5DnT474zp6xwg2Kkus8LbgEkMIPgtFIRg0 wd0bzi1R12xQn8m1RpX9YmpGUdBGzcv35dlRBoSkd4ylGryjOzemGLvAcfX7YcYI99g== X-Received: by 2002:a63:b54f:: with SMTP id u15mr23624698pgo.420.1541512052338; Tue, 06 Nov 2018 05:47:32 -0800 (PST) X-Google-Smtp-Source: AJdET5eUGMjYsWwo8s4RCIcT6T1v9+6MHI1RRETLinSRGIRN2+UXHSacrQYO85Q/WtGVmbDKobrz X-Received: by 2002:a63:b54f:: with SMTP id u15mr23624670pgo.420.1541512051499; Tue, 06 Nov 2018 05:47:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541512051; cv=none; d=google.com; s=arc-20160816; b=Dvr5WxdrnrVtVfa+avJ8LYNIJaRgOHo7lxev4IoESbln36GBRueD7so9tMwGpa+0lF /agLRaSnobXaLja3fjeX2/ohoUuEHVcnZMLjeMP9zEr/EE+n/ojGpUD2YHjIJieKSxCt kmV0ILpceCpZ8wo/RNTQcZ2ZdjTbWEXT2NQnj4DsqgEcKYG+/5yRqa1Uah5A1ylgGPuJ Cg5ebTcME71QD947hIAM1MXbT+KHhVlbydk+uwzQog5U2JunRhSlPyP8zAcwEjkWoUC1 Ceu9rcPdpObdZOyIWr5OZk/QKEphY1tRbRDfmI0u1Jx52SfKzMiZqSo96oGx+yCW8ZUl dq0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=sK6uVn3znqbDQsd+BAdMg1vx0CxsqEdbF7HZ8JITHv4=; b=N+0enEWTkOYOh/jrA6Ur2XFVv7OBvUxe+6+QhUIcDr8l3n6S19jn9LMWLC0fS/CE4f SQl6lJ4OFiaTkZ4ERhh1JFNuX3OvGc2YiroefAvhbHju/2vnTwZGfBstLYV4M2UayfP8 63vIJkJBLo9ORytoP0hXWUvID3PFh5uBQvfmhDLC9p2xvr7lHPfZQvPmdERGFXNmY8xo OsmMmZIRLfvRvlbqokMqz2HuxEI3oTa1tb5h0XvpVsv576vF/9nPIaBvjJsfrorE6kgZ R/hHgQyAFTCHuJUFAbaPdfW2xGMXt5jGXQg/fXMdh+HxWiz50AbSu+va5r4JfsnG4pPq nhLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of sean.j.christopherson@intel.com designates 192.55.52.88 as permitted sender) smtp.mailfrom=sean.j.christopherson@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from mga01.intel.com (mga01.intel.com. [192.55.52.88]) by mx.google.com with ESMTPS id g8-v6si49046849pli.338.2018.11.06.05.47.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Nov 2018 05:47:31 -0800 (PST) Received-SPF: pass (google.com: domain of sean.j.christopherson@intel.com designates 192.55.52.88 as permitted sender) client-ip=192.55.52.88; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sean.j.christopherson@intel.com designates 192.55.52.88 as permitted sender) smtp.mailfrom=sean.j.christopherson@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2018 05:47:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,472,1534834800"; d="scan'208";a="88971759" Received: from sjchrist-coffee.jf.intel.com ([10.54.74.154]) by orsmga006.jf.intel.com with ESMTP; 06 Nov 2018 05:47:30 -0800 From: Sean Christopherson To: Andrew Morton , linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= Subject: [PATCH v2] mm/mmu_notifier: remove mmu_notifier_synchronize() Date: Tue, 6 Nov 2018 05:47:05 -0800 Message-Id: <20181106134705.14197-1-sean.j.christopherson@intel.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Contrary to its name, mmu_notifier_synchronize() does not synchronize the notifier's SRCU instance, but rather waits for RCU callbacks to finished, i.e. it invokes rcu_barrier(). The RCU documentation is quite clear on this matter, explicitly calling out that rcu_barrier() does not imply synchronize_rcu(). As there are no callers of mmu_notifier_synchronize() and it's unclear whether any user of mmu_notifier_call_srcu() will ever want to barrier on their callbacks, simply remove the function. Signed-off-by: Sean Christopherson --- include/linux/mmu_notifier.h | 1 - mm/mmu_notifier.c | 7 ------- 2 files changed, 8 deletions(-) diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h index 9893a6432adf..913c3c13e36e 100644 --- a/include/linux/mmu_notifier.h +++ b/include/linux/mmu_notifier.h @@ -420,7 +420,6 @@ static inline void mmu_notifier_mm_destroy(struct mm_struct *mm) extern void mmu_notifier_call_srcu(struct rcu_head *rcu, void (*func)(struct rcu_head *rcu)); -extern void mmu_notifier_synchronize(void); #else /* CONFIG_MMU_NOTIFIER */ diff --git a/mm/mmu_notifier.c b/mm/mmu_notifier.c index 5119ff846769..755466cd289a 100644 --- a/mm/mmu_notifier.c +++ b/mm/mmu_notifier.c @@ -35,13 +35,6 @@ void mmu_notifier_call_srcu(struct rcu_head *rcu, } EXPORT_SYMBOL_GPL(mmu_notifier_call_srcu); -void mmu_notifier_synchronize(void) -{ - /* Wait for any running method to finish. */ - srcu_barrier(&srcu); -} -EXPORT_SYMBOL_GPL(mmu_notifier_synchronize); - /* * This function can't run concurrently against mmu_notifier_register * because mm->mm_users > 0 during mmu_notifier_register and exit_mmap