Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7377681rwd; Mon, 19 Jun 2023 23:55:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5jb7QEd///Tn9iyUqIvDYe6y+GIHpKG+Zka4AaaGjPm3TKIQulS9MLV7OtUCO7H0m8g/LO X-Received: by 2002:a17:90a:30c:b0:25b:a165:78d with SMTP id 12-20020a17090a030c00b0025ba165078dmr6450774pje.45.1687244108491; Mon, 19 Jun 2023 23:55:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687244108; cv=none; d=google.com; s=arc-20160816; b=b3LqT82Emszg3jwmxzo8vPjpV1X76zaR0qMm99jrNJoMvwhqsCe3AVCByYUgSiv4XJ Oi5+hUFkFf9JhxMquI1eC8R3lI+HRBI93VCBwtIGUE0hhzmIEyXutKZUs+cpgj6QjGTZ 1gPTyHro4AERiRid8THWpmqPy3XMDRGg3n5I0sz+cKVWzMucJyU0Btbl9W7msQU4J51n xRc1HV67b1fy/kktxSnjM66SbsGiB216lvJWbw3k4xq5JQUgmanw1kdcoxLFUtuLMwGG ek0up9tNqma1O+4XNIhcbut7SAf30r9Ovbw8fvi9zJ9z6vZL5qNLB91MI+atd87Z0q7f 1TiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:to:dkim-signature:dkim-signature:from; bh=VHkzoJWWRRTz1M33LEnyo1a9sWZjKqKnXGzXwAWtbx8=; b=kNDH9mvJG/NnHJ1BUShCSrc1dyvybgbPAmOGTx8a0ZnDn3KgiYU1YDl/wNWwodvWDQ H7tam+OgxgR9BvQ6uf9FUTvJwsQZ/pIexzjhPYk23dwtvoU9BcHSrV3g46qAdwFCvB5g 6Xe1dKBJDhrxUMH7OGMOIyh409aNVugvJXIz7V15rtx81y7L4YqpntpQuDZBmRMlVYpD JZhDPukWPDktSx+GW8uuwwiMHtmtuIKJ2WPt69SGLnRXxgl7SXCskYs+eCdAF3KpOQ64 W5nrMzPqf7pIilEnokAO9fGCBhTh9WG7vJeRdz1btqSsW/M3zTt8a5cMSZGNxLpc+rJr I4cQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="U52/kdmZ"; dkim=neutral (no key) header.i=@linutronix.de header.b=Nv7Sgjti; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w9-20020a17090a8a0900b0025bb4a1c12esi1292612pjn.148.2023.06.19.23.54.56; Mon, 19 Jun 2023 23:55:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="U52/kdmZ"; dkim=neutral (no key) header.i=@linutronix.de header.b=Nv7Sgjti; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231174AbjFTGch (ORCPT + 99 others); Tue, 20 Jun 2023 02:32:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231161AbjFTGce (ORCPT ); Tue, 20 Jun 2023 02:32:34 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86F70E60; Mon, 19 Jun 2023 23:32:33 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1687242751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VHkzoJWWRRTz1M33LEnyo1a9sWZjKqKnXGzXwAWtbx8=; b=U52/kdmZ/M584OtYX9Rr5pCjN49UC1hlVzO6HV7MuOAyoU2cJtxOHDcxeVk4FdLr1p3oss 6cXGMYpvfOkDw70VhQo9S0Q/5T2Hij6HIoxuXppVXg5nGeV1E93qd8YsrUyD2otJozx4u8 N0fVoLf59JxnSfOB+wfp4revCcyv9z4xPMZrnT8RVOCXr7skqRgiKwQQ8o8fbhSN9IXcqB g803jv46kE47EQudOfGGNTSZ5nhqJkcjXpq0VYsb9Opnz15me84OIzO+NKgz6nUcgNCW92 z7Ajnji0Q76XI93N8aIc0+iJlzE8DLnR51Q4HpP01Wku2RT4Hdj45tdrbFY8dA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1687242751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VHkzoJWWRRTz1M33LEnyo1a9sWZjKqKnXGzXwAWtbx8=; b=Nv7SgjtiLnQP/FgOj1zrF0cPEO095/BL8XiS8mr9u31yg6gGz5VJvnR9OPvyVg7/Ntrd0i AGtBUYd977x9t+Dw== To: Nicholas Piggin , linux-kernel@vger.kernel.org, mm-commits@vger.kernel.org, torvalds@linux-foundation.org, peterz@infradead.org, akpm@linux-foundation.org Subject: Re: + lazy-tlb-fix-hotplug-exit-race-with-mmu_lazy_tlb_shootdown.patch added to mm-hotfixes-unstable branch In-Reply-To: References: <20230525205253.E2FAEC433EF@smtp.kernel.org> <87v8fv86bh.ffs@tglx> Date: Tue, 20 Jun 2023 08:32:31 +0200 Message-ID: <87jzvyprsw.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 20 2023 at 16:02, Nicholas Piggin wrote: > On Sun Jun 11, 2023 at 5:29 AM AEST, Thomas Gleixner wrote: >> /* >> * Invoked on the outgoing CPU in context of the CPU hotplug thread >> * after ensuring that there are no user space tasks left on the CPU. >> * >> * If there is a lazy mm in use on the hotplug thread, drop it and >> * switch to init_mm. >> * >> * The reference count on init_mm is dropped in finish_cpu(). >> */ >> static void sched_force_init_mm(void) >> { >> >> No? > > It could be done in many places. Peter touched it last and it's > been in the tree since prehistoric times. That's an argument for slapping it into some randomly chosen place and be done with it, right? >> > +/* >> > + * After the CPU is offline, double check that it was previously switched to >> > + * init_mm. This call can be removed because the condition is caught in >> > + * finish_cpu() as well. >> >> So why adding it in the first place? >> >> The changelog mumbles something about reducing churn, but I fail to see >> that reduction. This adds 10 lines of pointless code and comments for >> zero value. > > Not sure what you're talking about. The patch didn't add it. Removing it > requires removing it from all archs, which is the churn. Sure. That's left as an exercise for others, right? Oh well. tglx