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.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,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 60F35C433E2 for ; Mon, 14 Sep 2020 10:24:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 090C82078D for ; Mon, 14 Sep 2020 10:24:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Qgm2P8lX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 090C82078D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 88A856B005A; Mon, 14 Sep 2020 06:24:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 83BBF8E0001; Mon, 14 Sep 2020 06:24:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7010E6B0068; Mon, 14 Sep 2020 06:24:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0189.hostedemail.com [216.40.44.189]) by kanga.kvack.org (Postfix) with ESMTP id 57D1E6B005A for ; Mon, 14 Sep 2020 06:24:11 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 0FE68180002B8 for ; Mon, 14 Sep 2020 10:24:11 +0000 (UTC) X-FDA: 77261281902.18.trees56_3614b7727107 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id D39C9105DB01D for ; Mon, 14 Sep 2020 10:24:10 +0000 (UTC) X-HE-Tag: trees56_3614b7727107 X-Filterd-Recvd-Size: 4164 Received: from mail-ej1-f66.google.com (mail-ej1-f66.google.com [209.85.218.66]) by imf25.hostedemail.com (Postfix) with ESMTP for ; Mon, 14 Sep 2020 10:24:10 +0000 (UTC) Received: by mail-ej1-f66.google.com with SMTP id lo4so22410412ejb.8 for ; Mon, 14 Sep 2020 03:24:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jV6D5Ck9gFOE7DCBMEmlAIDMaEEB8asrxDS/Nejj/VY=; b=Qgm2P8lXIs/sG42zI4dGYqmeeuImWwBegT9scXex3DjQYg1D+hgZGKMOWRoRqEz7pG sKvAKulF8YZPx5MXiU36nO2A3H4ku9B/rhHbVwUfkvSpDM+uI5dcOxb6LayzQNPQYgan 3tcVCl2wWyb5oi7dKZCXHgEA6/7NUpBPDy4Jqn0xwqgbA89WLx2ZEj3tOqWlW7ZFIHeH Xn5Z30tBlNIhPn25AniCkxw14DjW2HuyYnzctb8L3gzPIG5eL7HfKhPIk3ZQzAQnoVaM J55P0EW3ru9M5Et00VM31+OUnYbvxshnaLd76jTJvDAFe8XgK4WpedOIPCc8v9hRrqBg 78QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jV6D5Ck9gFOE7DCBMEmlAIDMaEEB8asrxDS/Nejj/VY=; b=mJLA6kb/mS03e5SFHfRqW92Q/bTQ3/Voq50JVnFB1iqQIaz9+MhH/bdWfkIYBoeOND 3EVniyPVDOmfwSGfuQQn+sHCVJEQobA5NdXOIM3sryyJKRpTts240N1MwoGSV2QBNajQ qZKFYsbZxgmAQFpgEGvb+SsD7wp5SFUHvc8bmC2D+R/4BTdeI9CqljucJIdzKWUqdXn4 5Z+Mxdu6f2BZyCMRJkfzhzmFv+AobInFdWxmbfwx1RLSAf2xXsOQWa7atRLCzsgq4nt7 qUUuKx6Th39qiib2ktnDeWaxLtJjhlDEzo7l5MvxYPI3lQctnNoDc4RuMJzMyG3hTzVS 5GRg== X-Gm-Message-State: AOAM531EY6BCRMH2qM45XIrl9sxvWA66AQQfU3RxVKvec6xVZa12/mqO GJ/yTC96kmkD0wNDIIT2mdSfVSq62+B4iEaegxM= X-Google-Smtp-Source: ABdhPJxnBtRjr7WvcpNx4smmkuTpFTtnmeqe15JlsLaG07UR+6yM4//MyNOvunJKChDZKrrrN1vT1OGpv807OJjacRI= X-Received: by 2002:a17:906:54e:: with SMTP id k14mr13918816eja.59.1600079049351; Mon, 14 Sep 2020 03:24:09 -0700 (PDT) MIME-Version: 1.0 References: <20200914045219.3736466-1-npiggin@gmail.com> <20200914045219.3736466-4-npiggin@gmail.com> <1600066040.vnmz9nxhwt.astroid@bobo.none> In-Reply-To: <1600066040.vnmz9nxhwt.astroid@bobo.none> From: Anatoly Pugachev Date: Mon, 14 Sep 2020 13:23:58 +0300 Message-ID: Subject: Re: [PATCH v2 3/4] sparc64: remove mm_cpumask clearing to fix kthread_use_mm race To: Nicholas Piggin Cc: linux-mm@kvack.org, Andrew Morton , "Aneesh Kumar K . V" , Jens Axboe , "David S . Miller" , linux-arch@vger.kernel.org, Linux Kernel list , linuxppc-dev@lists.ozlabs.org, Peter Zijlstra , Sparc kernel list Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: D39C9105DB01D X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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 Mon, Sep 14, 2020 at 10:00 AM Nicholas Piggin wrote: > > Excerpts from Nicholas Piggin's message of September 14, 2020 2:52 pm: > > [...] > > > The basic fix for sparc64 is to remove its mm_cpumask clearing code. The > > optimisation could be effectively restored by sending IPIs to mm_cpumask > > members and having them remove themselves from mm_cpumask. This is more > > tricky so I leave it as an exercise for someone with a sparc64 SMP. > > powerpc has a (currently similarly broken) example. > > So this compiles and boots on qemu, but qemu does not support any > sparc64 machines with SMP. Attempting some simple hacks doesn't get > me far because openbios isn't populating an SMP device tree, which > blows up everywhere. > > The patch is _relatively_ simple, hopefully it shouldn't explode, so > it's probably ready for testing on real SMP hardware, if someone has > a few cycles. Nick, applied this patch to over 'v5.9-rc5' tag , used my test VM (ldom) with 32 vcpus. Machine boot, stress-ng test ( run as "stress-ng --cpu 8 --io 8 --vm 8 --vm-bytes 2G --fork 8 --timeout 15m" ) finishes without errors.