Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp570402ybe; Wed, 4 Sep 2019 04:32:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqyVfqPmuwVx2c9ZP7QIEJmifZqhHdIq2H90R89gHukY+paHriSt4HhKx7vfzNIF1OcXJ1lk X-Received: by 2002:a17:902:7088:: with SMTP id z8mr9977654plk.307.1567596730711; Wed, 04 Sep 2019 04:32:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567596730; cv=none; d=google.com; s=arc-20160816; b=yfLKBoRF2mbhJD/88NbSuN2bT1orLkhRwrMWr+/IlnQydKN3bx/7PkXEpLMneRoR26 5LKu0J3mvjPsByjvu5cTUcGUxxksQ89WXjfHXTv6uQeiOq8t+DdG6QQBfuvE7TN8Rz4w /VaDU048VJRB1B5Lk5i0LDy3Szru6VDvJKF2AlBWTGbRfmPD+8L9KQDUvNjAR4CK4K6O ZxXgn1gGeI6ieH2nZjdiFqA6N+nVnnXN6/Q9xixikkiVRpRpTnszCIqDd5dF1L8OAJgg I95aMjtDS+CAp6Rmhkh+5NHQl41mX1oWb3rNo69pZamRPsopvKkPpXMne0vWxsgljnut 4eXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=82pg+k6PTBMUqMULmrjW9kl2AYZfRGcRZ+6Qk8vy73E=; b=TyLfdGRNVyjQNLR18HqS5vHNB4oaeydmua2i5fiWlXwhMW4v90K00TekOfyn17ql5N VSuXi7khx0zSULe71UkUkiX5RZ3AH7xKXETNywhb733CsfijPEmHQJj/dvIpNlOXyoEc FhYQ8Ttvj08EbWQ8z+1JHZEGXGwM3XCaQRTplw7OQ6/Ds9EWPNJHiepF9mPurJ4wFyMU xiwpO6Nz12eSyICQ7+V4AcE2oeyOvA6oNQ5IjnKCm1Jm8VvNcQm+J5sYppGWWAI6ywGt PedlVEyXvNPjQGer71w2R8zjH8EICpVvNvp6hi8GTp3mcEsaV48qm8iwliokjEVD+6NE 7Q1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=aydfYRBB; 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 i71si2167482pje.34.2019.09.04.04.31.54; Wed, 04 Sep 2019 04:32:10 -0700 (PDT) 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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=aydfYRBB; 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 S1729296AbfIDLbB (ORCPT + 99 others); Wed, 4 Sep 2019 07:31:01 -0400 Received: from merlin.infradead.org ([205.233.59.134]:33134 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726240AbfIDLbA (ORCPT ); Wed, 4 Sep 2019 07:31:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=82pg+k6PTBMUqMULmrjW9kl2AYZfRGcRZ+6Qk8vy73E=; b=aydfYRBBzcBKti9b5JJS9mylB XXahKl1aHGKEANMGjXvNPKymNmHBbNeVfepdPIojIX+D3eGeW2nB0S8CyB9myUpXqBR/B/p2UsfP+ aRi9JHkITP5IwKG15RfP2pPM9kmes9C1J5RqS02jU+agZFpaiaXJQu3DgKhdkbn292dTGS+buwIMF MpJe1+Pd0sk2iOW4in216jiBJwLzUgPYBM6vlEfFtd2tVgVUAmI3XWq1kC/qoH8Io2Yr1lFBF59oj pRepsELo09npJ3i/KEZY/yPPNUW1wGgQEamDD8OsGoO4uOGCh+V3ualubtkAwIfeFBoR7bJowGvjC 8BpNor78w==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1i5TUn-0004QI-Ig; Wed, 04 Sep 2019 11:30:41 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 5C6B5303121; Wed, 4 Sep 2019 13:30:02 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id CF7E729C3712D; Wed, 4 Sep 2019 13:30:38 +0200 (CEST) Date: Wed, 4 Sep 2019 13:30:38 +0200 From: Peter Zijlstra To: Steven Rostedt Cc: Alessio Balsini , mingo@kernel.org, juri.lelli@redhat.com, linux-kernel@vger.kernel.org, dietmar.eggemann@arm.com, luca.abeni@santannapisa.it, bristot@redhat.com, dvyukov@google.com, tglx@linutronix.de, vpillai@digitalocean.com, kernel-team@android.com Subject: Re: [RFC][PATCH 01/13] sched/deadline: Impose global limits on sched_attr::sched_period Message-ID: <20190904113038.GE2349@hirez.programming.kicks-ass.net> References: <20190726145409.947503076@infradead.org> <20190726161357.397880775@infradead.org> <20190802172104.GA134279@google.com> <20190805115309.GJ2349@hirez.programming.kicks-ass.net> <20190822122949.GA245353@google.com> <20190822165125.GW2369@hirez.programming.kicks-ass.net> <20190831144117.GA133727@google.com> <20190902091623.GQ2349@hirez.programming.kicks-ass.net> <20190904061616.25ce79e1@oasis.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190904061616.25ce79e1@oasis.local.home> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 04, 2019 at 06:16:16AM -0400, Steven Rostedt wrote: > On Mon, 2 Sep 2019 11:16:23 +0200 > Peter Zijlstra wrote: > > > in sched_dl_period_handler(). And do: > > > > + preempt_disable(); > > max = (u64)READ_ONCE(sysctl_sched_dl_period_max) * NSEC_PER_USEC; > > min = (u64)READ_ONCE(sysctl_sched_dl_period_min) * NSEC_PER_USEC; > > + preempt_enable(); > > Hmm, I'm curious. Doesn't the preempt_disable/enable() also add > compiler barriers which would remove the need for the READ_ONCE()s here? They do add compiler barriers; but they do not avoid the compiler tearing stuff up. So while Linus has declared that compilers should not be tearing shit up, I'm hesitant to actually trust compilers much these days.