Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp899227ybt; Wed, 8 Jul 2020 14:47:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCVRSG3pHiKrv1BzpqfR0lvxQ6RCuThXIlJt/oeV7MjJloMgzMrhCQcked1PYj/hJZg305 X-Received: by 2002:a17:906:958f:: with SMTP id r15mr42776225ejx.77.1594244865512; Wed, 08 Jul 2020 14:47:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594244865; cv=none; d=google.com; s=arc-20160816; b=qVoQw3UiDRgRCDUb4ugqCqzMxFSoJWrTu/NotBW3R9pnxqq6DtHv9hCu/ldE8Js27H bRYYWKCtUoD3aciQWsoRZdZ5nFovxv9n4dwUV1IYpv5VWq890MZzwThcyRzflMZko/lk KyB+Fd7cgeGBl6k74z7J5HxZRBLYj+pTh8WQej4Jm9hU62yIRZWVQuIJ6S66Jyu16Yc2 uKbDwbkJUPm24MZSLEe4TH/m4dpH7RUJqnDNl7yHIniQJjvr2i7FGkofdgUND31tYHxx YlqeqiumVZr/qxNOgUOunA3eC6Non+ZktsVl7F3jehUN85a0mh78qEFdHYtzOVY9wht9 8n9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:date:in-reply-to:message-id :subject:cc:to:from:user-agent:references; bh=2mI7+vKE5QZ2qSlbiN+Yb2MYXMS/KpZfXyBnOfJCaf8=; b=VtMoXotjIBDLZoLRWQxP5SBop4IUpPXcaWaVs8noixVSVec3P9JHtq273mspQrO2nV aM+ULYrRZstnbkPkNlV6VH8OIfyPd5RPjoN3BZqkXZQrSpmSlxuJfYk/iuKlQ7yXalsf hWzUI+82v2+CQZTKxmTExxsdL9XjoUrVAI7IiLWSSLImCexic68q4Ico1VVI7qvmxqY0 zP0giJmDD4ouv558ctplWQe6YGv9MW2i7r15RxuhgsdYv02SY5+yvSEeNIuU187ra7Rs kPR2tXD+PSASbjsMUWXnWCPDOfFuvVf7PID43Y7cuMQXl5tCZRBLoBC4+6g3MqtiasDC W4tg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x15si678659ejc.115.2020.07.08.14.47.22; Wed, 08 Jul 2020 14:47:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726268AbgGHVpW (ORCPT + 99 others); Wed, 8 Jul 2020 17:45:22 -0400 Received: from foss.arm.com ([217.140.110.172]:39850 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbgGHVpV (ORCPT ); Wed, 8 Jul 2020 17:45:21 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C1BF91FB; Wed, 8 Jul 2020 14:45:20 -0700 (PDT) Received: from e113632-lin (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5996C3F887; Wed, 8 Jul 2020 14:45:18 -0700 (PDT) References: <20200706142839.26629-1-qais.yousef@arm.com> <20200706142839.26629-2-qais.yousef@arm.com> <20200707093447.4t6eqjy4fkt747fo@e107158-lin.cambridge.arm.com> <20200707123640.lahojmq2s4byhkhl@e107158-lin.cambridge.arm.com> <20200708130831.4oaukv65hbano3j7@e107158-lin> User-agent: mu4e 0.9.17; emacs 26.3 From: Valentin Schneider To: Qais Yousef Cc: Ingo Molnar , Peter Zijlstra , Doug Anderson , Jonathan Corbet , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Luis Chamberlain , Kees Cook , Iurii Zaikin , Quentin Perret , Patrick Bellasi , Pavan Kondeti , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v6 1/2] sched/uclamp: Add a new sysctl to control RT default boost value Message-ID: In-reply-to: <20200708130831.4oaukv65hbano3j7@e107158-lin> Date: Wed, 08 Jul 2020 22:45:12 +0100 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/07/20 14:08, Qais Yousef wrote: > On 07/08/20 12:05, Valentin Schneider wrote: >> > AFAIU rcu_read_lock() is light weight. So having the protection applied is more >> > robust against future changes. >> >> So I think the one thing you win by having this dance with mb's and the >> suggested handling of the task list is that you do not need any >> rcu_synchronize() anymore. Both approaches have merit, it's just that the >> way I understood the suggestion to add sched_post_fork() was to simplify >> the ordering of the update with the aforementioned scheme. > > The synchronize_rcu() is not for sched_post_fork(). It is to deal with the > preemption problem. > >> >> > >> >> >> >> sched_post_fork() being preempted out is a bit more annoying, but what >> >> prevents us from making that bit preempt-disabled? >> > >> > preempt_disable() is not friendly to RT and heavy handed approach IMO. >> > >> >> True, but this is both an infrequent and slow sysctl path, so I don't think >> RT would care much. > > There's an easy answer for that. But first I'm not sure what problem are we > discussing here. > > What is the problem with rcu? And how is preempt_disable() fixes it or improves > on it? > Minimizing the races we have to think and take care of would make this easier to review and maintain. That's what I was suggesting with getting entirely rid of the preemption+update issue and having only the update+forkee race to take care of, which is IMO fairly straightforward to reason about on its own. That said, you're driving the thing, and I'm not, so I'll trust your judgement here. > Thanks