Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp372852pxv; Thu, 8 Jul 2021 04:38:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7zUxrf9XtiFS8nq4qVj9ciwtr+SxyHNJmYKXdGYtUTRIbSRTAYbkHItYGdprLglWlqoSG X-Received: by 2002:a05:6402:1118:: with SMTP id u24mr21624110edv.229.1625744305989; Thu, 08 Jul 2021 04:38:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625744305; cv=none; d=google.com; s=arc-20160816; b=XHPYkzLmzmj8dKuaLWmzcfvx+4Pu5gjBBUpWF0UUcjWFLcJsq8Xt4MuWCICiFcWCKH D+OZFuSyXNWsEn/zEoa379ONDSW6MRGsuLAsMAzS3B9APpHPMQix8S5XznjzN9tA/Fti YW0qVeayQBFGcVr+ZRxFFT26nPLlHQN8LjWRhzivOjJgbKOskqY6U+4/2R8yq8iE9lX8 DzgJmd6eLLK9pFwnIXYAAPpZuFS229HyznEYTA9QXFnyH41gkRDpveOhwJqGFDiZ2k7n O8derW7Rih2IRbHq4GiaN1L3FK3Ra2aaZ/Weag6OcMFm6wfkqvhbrvfYO6zZHz2OW7S+ w50w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PRDPTYzsNQqDQUDseTaYquv4wGloS3Xm1/6/BzUpudM=; b=MtWsK1MTDnJXz7tUXmP0DIVkiP2Fu2r7kymQQGlrMWLu7pFpV/ERgHjkaIeB832WyN Z3G4IBTvblUp0liKvjUtuOHHCphQF9+2S+bIxe1Htsmn12N30vOE2ZCt4o9SPKD1XUlk 2WgRPViJ8HN5B942UB24NrwA5GFusDVn0+vGLNa8aNFMoRY8V9TrfI5ycMjVI+iO8n/S Y9DUNlQcm7VxPoIaoznGm4MBVFXdBaVWMyLjkLr9G+InZ6qdFBWIfpEfwoZqXQc2Zc72 jeUo9jA4HEEQTuKTRe5/Rq9csG9bvIUC6FCpRv7mFcIwpmjIsQwFfk14fbmAKYVtK9u3 4kkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="oy8C1/SN"; 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 u19si3105960edo.288.2021.07.08.04.38.02; Thu, 08 Jul 2021 04:38:25 -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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="oy8C1/SN"; 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 S231753AbhGHLjE (ORCPT + 99 others); Thu, 8 Jul 2021 07:39:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231737AbhGHLjD (ORCPT ); Thu, 8 Jul 2021 07:39:03 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D148CC061574 for ; Thu, 8 Jul 2021 04:36:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=PRDPTYzsNQqDQUDseTaYquv4wGloS3Xm1/6/BzUpudM=; b=oy8C1/SNPsCrtF8eOvPL5o5oVk HxFj0sM3H5C9i0Q52l/hm/0x5BabRw+tG0Krm6xDGc5MXqfpZTWPON2r3+PbxiedDWjKsfHhzPAgB Bnf/ceZ23jFbsQ2Hktgmjk4TwPTewe/o868npQoqKXDDfmmzend9j1UQkcSMaLSIm64A0XeEcoOo1 iEFCg3CGeRNjGLBNaNQd7AA7KIiePZ+PXYPWY8hvOyC+v1gxWa1WrJu3Fg5dABcziM1WeyhNUUEnw a2xQFRHGhTHyTkSjjsdu5T5Zgkeriiqc7QVAQ9D508f/UjtKEU04CiBauhChmXNZVFkQ4R7+V9kKL CpgYTzOQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m1SJU-00DMTy-T0; Thu, 08 Jul 2021 11:35:32 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id AB2DF300233; Thu, 8 Jul 2021 13:35:26 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 709AA2018A705; Thu, 8 Jul 2021 13:35:26 +0200 (CEST) Date: Thu, 8 Jul 2021 13:35:26 +0200 From: Peter Zijlstra To: Juri Lelli Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, vincent.guittot@linaro.org, rostedt@goodmis.org, dietmar.eggemann@arm.com, bristot@redhat.com, bsegall@google.com, mgorman@suse.de, Mark Simmons Subject: Re: [PATCH] sched/rt: Fix double enqueue caused by rt_effective_prio Message-ID: References: <20210701091431.256457-1-juri.lelli@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210701091431.256457-1-juri.lelli@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 01, 2021 at 11:14:31AM +0200, Juri Lelli wrote: > Looks like this survives the test case (and regression testing), but I'm > still not fully convinced that the above statement "Concurrent priority > inheritance handling is still safe and will eventually converge to a new > state by following the inheritance chain(s)" is actually sound. I think we good there. rt_mutex_adjust_prio_chain() updates ->prio in step 7 and calls rt_mutex_setprio() in step 11. So if we race against __sched_setschedule() and observe the old value, step 11 will follow up and correct us.