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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MIME_QP_LONG_LINE,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 2B1F4C33CAA for ; Mon, 20 Jan 2020 20:35:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C060C22527 for ; Mon, 20 Jan 2020 20:35:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lca.pw header.i=@lca.pw header.b="Azm74f9b" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C060C22527 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lca.pw Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 250A86B0699; Mon, 20 Jan 2020 15:35:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 228706B06A0; Mon, 20 Jan 2020 15:35:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 165EE6B06A1; Mon, 20 Jan 2020 15:35:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0112.hostedemail.com [216.40.44.112]) by kanga.kvack.org (Postfix) with ESMTP id F354E6B0699 for ; Mon, 20 Jan 2020 15:35:12 -0500 (EST) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 8E9C31F0A for ; Mon, 20 Jan 2020 20:35:12 +0000 (UTC) X-FDA: 76399167264.02.coat64_4a83cefb6c019 X-HE-Tag: coat64_4a83cefb6c019 X-Filterd-Recvd-Size: 3919 Received: from mail-qt1-f195.google.com (mail-qt1-f195.google.com [209.85.160.195]) by imf26.hostedemail.com (Postfix) with ESMTP for ; Mon, 20 Jan 2020 20:35:11 +0000 (UTC) Received: by mail-qt1-f195.google.com with SMTP id j5so826603qtq.9 for ; Mon, 20 Jan 2020 12:35:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=uWbG+L0o14IZj3qiM7C/tN6Cfd1CRzUg46OsGAWkndI=; b=Azm74f9bLpx0RHMqOE+4JZ1YVuAOBmv5fTDmuOnBktuhIl/n5ySiWJx355ifEM0p0M nesCts8lRvdjWFIXNGR72742cx7auysZkjqtv4dfLmme4DLNAnlmy7BXJzV0tEU95EKA oW36ey7Ka+nFv346R9uOn9mOiQubvO3QWw6VPPohbdNu1P36NycIsbjO3dtvOnxaPb3U ualVbcu97G8ajskRjJC0Y0zoc9TcCokzJdntEHqrxOUEeRAwRn75eRbUsYvgRbXrqaJ6 uY3eEsX3wJA1+G2DE3g4vex6V5A8dBvXO1Rla8MJO5tMe7NkEhxlU4cNsa8FzB/Z7hue MyFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=uWbG+L0o14IZj3qiM7C/tN6Cfd1CRzUg46OsGAWkndI=; b=EA7OTV9i5tnykr8PkrhpnUfQdGEPq3H4UrB+PrwT5ie8CV996/XEqcZ96v63dK0uGm em7gehFWy+Bq+mc+EmbKtt5Rs1kbWqCT0e7eTsfBBYmkqQuCCrf9GJzNY/p0zaIEvrs/ 3UyqJe/XDWIYfCTDPRpsM4lCBniFGO9Te9aFJmAUgeYgvUIysSNR6Brn7lMVNTG4dZl5 TvuQhiMNrNNCcDLGZ74X7NcLQOF6vPy5BId8pJCUTn1ztJX29gUfQg6n/5fp9eU59SGN RaZdFZF7jDVIPJ4heAEpi8NYeOgqvy+1RhjShAHFZbhe2n2bJUVwPh0KaVqaug2223zj c1Ng== X-Gm-Message-State: APjAAAVHipOGJPGA0wFv7lbTcRJWxNgYACAbqzQoplqobx04y+aCxkhy vNv+JjNQTilFv+rmI07kgHCzww== X-Google-Smtp-Source: APXvYqyZVqvs5gkBK+6X6ozDe5OxP4ZKixI6zB9Lbc9sGgREZyxpFufx/qut0WqF8jvyNaZpIwoMcw== X-Received: by 2002:ac8:12c8:: with SMTP id b8mr1190499qtj.111.1579552511371; Mon, 20 Jan 2020 12:35:11 -0800 (PST) Received: from [192.168.1.183] (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id 68sm16537846qkj.102.2020.01.20.12.35.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Jan 2020 12:35:10 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Qian Cai Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v2] sched/core: fix illegal RCU from offline CPUs Date: Mon, 20 Jan 2020 15:35:09 -0500 Message-Id: References: <20200120101652.GM14879@hirez.programming.kicks-ass.net> Cc: mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, paulmck@kernel.org, tglx@linutronix.de, linux-mm@kvack.org, linux-kernel@vger.kernel.org In-Reply-To: <20200120101652.GM14879@hirez.programming.kicks-ass.net> To: Peter Zijlstra X-Mailer: iPhone Mail (17C54) 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 Jan 20, 2020, at 5:17 AM, Peter Zijlstra wrote: >=20 > Bah.. that's horrible. Surely we can find a better place to do this in > the whole hotplug machinery. >=20 > Perhaps you can have takedown_cpu() do the mmdrop()? The problem is that no all arch_cpu_idle_dead() will call idle_task_exit(). = For example, alpha and parisc are not, so it needs to deal with some kind of= ifdef dance in takedown_cpu() to conditionally call mmdrop() which sounds e= ven more horrible? If you really prefer it anyway, maybe something like touching every arch=E2=80= =99s __cpu_die() to also call mmdrop() depends on arches? BTW, how to obtain the other CPU=E2=80=99s current task mm? Is that cpu_rq(c= pu)->curr->active_mm?=