Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2949799ybl; Mon, 20 Jan 2020 12:36:28 -0800 (PST) X-Google-Smtp-Source: APXvYqwz9YJXUEnLUaBwmUYyebprfYvTBHi40d1qJYKFwGj6YD4AX1Tty+siFkCl9XYtOtdoexq8 X-Received: by 2002:a05:6830:1e67:: with SMTP id m7mr971775otr.262.1579552588407; Mon, 20 Jan 2020 12:36:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579552588; cv=none; d=google.com; s=arc-20160816; b=hDTFdIMsOnIRvX3FxWYZrzk+p1HFuWuml0e6nieVBypuSIxihRSEJdKO2sziUMNXkG mgZnp0vvCVyKfIzzGzAFfUfl9NfXjDANQXwn2SqX1Dg+jdLSYZxvJ8tV5oN1xzmvTqwG 6l8lnHg1mHrXI01lqlTD//VaoBjT5XIwJvdaSQD76nOcbT58K9ylVTLEU/GXI+3HzH8l ibrgU/ROzRU6qCLbWm9hyOzHcAeRwajePs7DMVgaeMh1bgtSQUlvMidLcWvtvOB1wRdj CGID6etZrZOqKGWJkpBEuI3Gotbqo3VkmvWo5JvhJ1LFuPBB75jFQBzFW0pGBxSwvZVv 5fqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:in-reply-to:cc:references:message-id :date:subject:mime-version:from:content-transfer-encoding :dkim-signature; bh=uWbG+L0o14IZj3qiM7C/tN6Cfd1CRzUg46OsGAWkndI=; b=unk/l3qV3fR4bb8LEQmcC63u+r+hTSCW/j+IeTzfnZ+kE8nQhvQbEsqPMdl42ebkB/ fcvYh7THhdbigUBg8LzpyJEljv+VmhEsc844579qbXY3gKAsi3dYnS/VP2QHlAe4aJNg o1LvkldwLY6cAN+TW7t5EeIZXIPlZKBfC4yF4B3FbKh1mfZzSMJfb+qx4jmp8vDBq2zU Hgv6PMBvdD0dxFYuP5FyVtw+4uBYOGCBzzUUZB3ikqx5E7aDl9r4atKucKjOKAwxkvar 15NUc17ojyZt/PgcgIohl8bW3gu3KvtN8z2KvO1XBIxObSIN6cxjuaIKNICuTp+j7JNL 71ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=Azm74f9b; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z1si20421169otp.70.2020.01.20.12.36.14; Mon, 20 Jan 2020 12:36:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=Azm74f9b; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726890AbgATUfM (ORCPT + 99 others); Mon, 20 Jan 2020 15:35:12 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:45696 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726607AbgATUfM (ORCPT ); Mon, 20 Jan 2020 15:35:12 -0500 Received: by mail-qt1-f195.google.com with SMTP id w30so816091qtd.12 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=nwnMn+BMrt0NDpZc+l6NrZnowC6pq3kI0lRvs4e+Hc8rleb+i3qZTFafx10wrCm4xW WvZz0q3akKV4Z/N6MBxGVzFOHjf4q3YuI+mXVHYwnjd7YxQ0nFVrUl6+br+9ne2BVrhl H4IjaPvVfvEjeZM6RrEg7ojjGcEDChXlvT5cDbjLeYJiL0nhvO4f/cIBCYfysoGK31lM iWLw1fOtSq/hCTmLe5NrLRajx/Jfgr2ov2gkUw31wVKpb155tyx7eRhD71fUnUR7WZrH +UhRj3vMmeMZfszm45r1QI2D+AlKR4u6f3xOc4uBXPeoug9ufQFA9+TWkyadzn0S8Hlk ZUlw== X-Gm-Message-State: APjAAAXvy3XbbYjZfu/qbLKB1fqd9W2rFs5c9mAuCzankWr/efS1bzOR VmPrYSLNZKVq07thRE8DWaRB9w== 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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?=