From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B57AC433DF for ; Fri, 10 Jul 2020 09:48:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4F94D206F4 for ; Fri, 10 Jul 2020 09:48:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="br/6N3S/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4F94D206F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CFBFA8D0003; Fri, 10 Jul 2020 05:48:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CACC88D0002; Fri, 10 Jul 2020 05:48:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B73FC8D0003; Fri, 10 Jul 2020 05:48:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0074.hostedemail.com [216.40.44.74]) by kanga.kvack.org (Postfix) with ESMTP id A2C338D0002 for ; Fri, 10 Jul 2020 05:48:10 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 64E791807B78B for ; Fri, 10 Jul 2020 09:48:10 +0000 (UTC) X-FDA: 77021690340.26.news90_340532a26ecd Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 4261F1804B66A for ; Fri, 10 Jul 2020 09:48:10 +0000 (UTC) X-HE-Tag: news90_340532a26ecd X-Filterd-Recvd-Size: 3301 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Fri, 10 Jul 2020 09:48:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=w3kp1+jdf3bXyU6T7tLgS3NnoV3a3u51ChfZ8zM0K6Y=; b=br/6N3S/jhoP3JJtrayUvCy7E2 /oRU43tMNdc0fhNyVDv7fH8+PstYkTFr08/wfrTrxhGC49B2ucWOnnRIlRuLDLPqDItmT26eTHVVT rKad4E6DtLTLe7r82xihXktEnX6M01WB8CtpTMKx0JkiRXLtOdgDsB46LJ2Um4Kwx0VPp7Sn4uFnj 9peCcN+glsBEtOBgkQNs5SlFneyn96pQGzqF1XgyfYmbBC6yaqpGsgv4jn5/X3BVoAhe1YjIuxGN7 +Ih7bvd7BtJLcLS+PaTsRy3yVa67fyYc9A2jpYSkiYQJx+S2batZv+RGXRz90Vxfyba40R2zVSQm8 SQgM/Jpw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtpdR-0001ld-Ea; Fri, 10 Jul 2020 09:48:01 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id EAD99304E03; Fri, 10 Jul 2020 11:48:00 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id D7BCF2B5130F2; Fri, 10 Jul 2020 11:48:00 +0200 (CEST) Date: Fri, 10 Jul 2020 11:48:00 +0200 From: Peter Zijlstra To: Nicholas Piggin Cc: linux-arch@vger.kernel.org, x86@kernel.org, Mathieu Desnoyers , Arnd Bergmann , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mm@kvack.org, Anton Blanchard Subject: Re: [RFC PATCH 5/7] lazy tlb: introduce lazy mm refcount helper functions Message-ID: <20200710094800.GA4800@hirez.programming.kicks-ass.net> References: <20200710015646.2020871-1-npiggin@gmail.com> <20200710015646.2020871-6-npiggin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200710015646.2020871-6-npiggin@gmail.com> X-Rspamd-Queue-Id: 4261F1804B66A X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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: On Fri, Jul 10, 2020 at 11:56:44AM +1000, Nicholas Piggin wrote: > diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c > index 73199470c265..ad95812d2a3f 100644 > --- a/arch/powerpc/kernel/smp.c > +++ b/arch/powerpc/kernel/smp.c > @@ -1253,7 +1253,7 @@ void start_secondary(void *unused) > unsigned int cpu = smp_processor_id(); > struct cpumask *(*sibling_mask)(int) = cpu_sibling_mask; > > - mmgrab(&init_mm); > + mmgrab(&init_mm); /* XXX: where is the mmput for this? */ > current->active_mm = &init_mm; > > smp_store_cpu_info(cpu); Right; so IIRC it should be this one: > diff --git a/kernel/cpu.c b/kernel/cpu.c > index 134688d79589..ff9fcbc4e76b 100644 > --- a/kernel/cpu.c > +++ b/kernel/cpu.c > @@ -578,7 +578,7 @@ static int finish_cpu(unsigned int cpu) > */ > if (mm != &init_mm) > idle->active_mm = &init_mm; > - mmdrop(mm); > + mmdrop_lazy_tlb(mm); > return 0; > }