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=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 C6705C3A5A5 for ; Tue, 3 Sep 2019 04:50:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A23D621881 for ; Tue, 3 Sep 2019 04:50:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726180AbfICEu5 (ORCPT ); Tue, 3 Sep 2019 00:50:57 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:55938 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725870AbfICEu5 (ORCPT ); Tue, 3 Sep 2019 00:50:57 -0400 Received: from in02.mta.xmission.com ([166.70.13.52]) by out01.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1i50mK-0005Xs-T6; Mon, 02 Sep 2019 22:50:52 -0600 Received: from ip68-227-160-95.om.om.cox.net ([68.227.160.95] helo=x220.xmission.com) by in02.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.87) (envelope-from ) id 1i50mK-0003mY-2W; Mon, 02 Sep 2019 22:50:52 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Linus Torvalds Cc: Oleg Nesterov , Russell King - ARM Linux admin , Peter Zijlstra , Chris Metcalf , Christoph Lameter , Kirill Tkhai , Mike Galbraith , Thomas Gleixner , Ingo Molnar , Linux List Kernel Mailing , Davidlohr Bueso References: <20190830140805.GD13294@shell.armlinux.org.uk> <20190830160957.GC2634@redhat.com> <87o906wimo.fsf@x220.int.ebiederm.org> <20190902134003.GA14770@redhat.com> <87tv9uiq9r.fsf@x220.int.ebiederm.org> Date: Mon, 02 Sep 2019 23:50:32 -0500 In-Reply-To: (Linus Torvalds's message of "Mon, 2 Sep 2019 10:34:46 -0700") Message-ID: <87k1aqt23r.fsf_-_@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1i50mK-0003mY-2W;;;mid=<87k1aqt23r.fsf_-_@x220.int.ebiederm.org>;;;hst=in02.mta.xmission.com;;;ip=68.227.160.95;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1/madnelSCO1LJd1mfgR0YFedlxlzUthKM= X-SA-Exim-Connect-IP: 68.227.160.95 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: [PATCH 0/3] task: Making tasks on the runqueue rcu protected X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I have split this work into 3 simple patches, so the code is straight forward to review and so that if any mistakes slip in it is easy to bisect them. In the process of review what it takes to remove task_rcu_dereference I found yet another user of tasks on the runqueue in rcu context; the rcuwait_event code. That code only needs it now unnecessary limits removed. I have lightly tested it, and read through everything I can think of that might be an issue. Peter would this be a good fit for your scheduler tree? If not I will toss it onto a branch someplace and send it to Linus when the merge window opens. Oleg do you have any issues with this code? Eric W. Biederman (3): task: Add a count of task rcu users task: RCU protect tasks on the runqueue task: Clean house now that tasks on the runqueue are rcu protected include/linux/rcuwait.h | 20 +++---------- include/linux/sched.h | 5 +++- include/linux/sched/task.h | 2 +- kernel/exit.c | 74 ++++------------------------------------------ kernel/fork.c | 8 +++-- kernel/sched/core.c | 7 +++-- kernel/sched/fair.c | 2 +- kernel/sched/membarrier.c | 4 +-- 8 files changed, 27 insertions(+), 95 deletions(-) Eric