Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp686036pxv; Fri, 9 Jul 2021 06:52:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWuSGRiUY4ACFVvUES3VlBW+awJq6Yg/OhVaUjL+1cVlKE6YalVtvliB62d3/exfdkI/BZ X-Received: by 2002:aa7:c711:: with SMTP id i17mr47034344edq.386.1625838731152; Fri, 09 Jul 2021 06:52:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625838731; cv=none; d=google.com; s=arc-20160816; b=Px83AQiQ1txe/v678bMDEhG0kSJ7r41FNSMcJD17Kl6hcd8F82BseQPfFcH5ODcxmA ceo693reSWtNTdMtIaWaVima2xNcv67Q8IjMhG0xr7ZieZcfvI/3BLY8R9QTiwr0v5Zt sMHCyggP7qrxsJzN9ns/hCuwNQBmczstC55QQDrEML25v18GINM8Sfa8+LaCxpUbfm/u pGGX2Nd32SzIgq9lO2O+QUE9nCYTaAfvZjgqpSZgrz1KcvnpAArBtNZMU1Mx7tPNWfnE gciL9h507EEZPs3YQ2NYySOw2HjPu4Vh6FtPksddUfSaoxguv+Q5QigEi+CKg9P2uZEq 6GpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=hVC3cXAhgYnSipbuuxux93KDFOSs/oL3p5xOhmYvtWo=; b=i0TrvZUkby89EmzI+WQ0yKKAuC/8nuo8L9HVZcvdVomhkO9Eq1qloURu/FDFuyJHJ+ 2JtchMnSKDZ+8PKmnJl2bZq3XLZx1rY63fUoJH4H0WIoYdL96WkTfcCuKuPYeprbi1xB 6++O2PBoFSPOYZTx4L8UC+xFewGx5yxLLJ116+Taeyqa6Ko4ZznLaD6+4+ndUEv6/siX cBSlSlM4FemKXK0/w2GqpJ8yJFyuGC2RUMltBzXAvz8EAIOo01nXny71WjW3gnkxzCXU uvw6SrP5cEs2ep7kPAiE8MK9v/IIx8gwUd2ob7LKZmq27vNRJG7V1XiNzDmhg0AB9kfl 9Ekw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b=cWB3cxoJ; dkim=neutral (no key) header.i=@linutronix.de header.b=iDLmk7mU; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g17si8552618ejr.586.2021.07.09.06.51.48; Fri, 09 Jul 2021 06:52:11 -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=fail header.i=@linutronix.de header.s=2020 header.b=cWB3cxoJ; dkim=neutral (no key) header.i=@linutronix.de header.b=iDLmk7mU; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231857AbhGINvS (ORCPT + 99 others); Fri, 9 Jul 2021 09:51:18 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:58762 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231682AbhGINvS (ORCPT ); Fri, 9 Jul 2021 09:51:18 -0400 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1625838514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hVC3cXAhgYnSipbuuxux93KDFOSs/oL3p5xOhmYvtWo=; b=cWB3cxoJSaVuRcaSa8q85BHUo4we2u+X4Z+9zJeJYLSEMt1u/AxV8omDcjeMPkUch38RdB 4G/NN+3C6hjxQb+6oNDncQgrSeyTsPL1/2vJheRqMqXoBxygtPHIwSXvAn/Ag9tg6yBR6R lToodPh9HSQwZuY51xCfq55RTDBlS81/4JmgnMF34eeIf+iGtAH0qRBVTFIDC6cK5QSWaB EZJEuwbO9Z6baMalA1qXgCLJtAXzyyYDZr7EwpSM4cdO4sJpdOJ7Uk00+AM45LDT69RzTk xW0DkdYNc82xPlugRnR+Bm+ovk/54C+TomUscxvIGNXFXWD3pvwMwrPEtQQrTA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1625838514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hVC3cXAhgYnSipbuuxux93KDFOSs/oL3p5xOhmYvtWo=; b=iDLmk7mU5iLGJJ3gsdnwKgDnHOn+R5VCbr4dfEEIj2KXnaInxLJhwsO6/El4OO/x8CM7d/ Shkj7Ql4xt6vHxAg== To: Andrew Halaney Cc: bigeasy@linutronix.de, linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, Chunyu Hu , stable-rt@vger.kernel.org Subject: Re: [RT PATCH] locking/rwsem-rt: Remove might_sleep() in __up_read() In-Reply-To: <20210708195125.zxqsxy5bpccgxb2n@halaneylaptop> References: <20210406221952.50399-1-ahalaney@redhat.com> <20210426164229.mbrsrjpmmhp7ehna@halaneylaptop> <877dkoud19.ffs@nanos.tec.linutronix.de> <20210708195125.zxqsxy5bpccgxb2n@halaneylaptop> Date: Fri, 09 Jul 2021 15:48:33 +0200 Message-ID: <87bl7boaxa.ffs@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andrew, On Thu, Jul 08 2021 at 14:51, Andrew Halaney wrote: Cc+ stable-rt folks and leave context untrimmed. > On Mon, Apr 26, 2021 at 08:16:34PM +0200, Thomas Gleixner wrote: >> On Mon, Apr 26 2021 at 11:42, Andrew Halaney wrote: >> > On Tue, Apr 06, 2021 at 05:19:52PM -0500, Andrew Halaney wrote: >> >> There's no chance of sleeping here, the reader is giving up the >> >> lock and possibly waking up the writer who is waiting on it. >> >> >> >> Reported-by: Chunyu Hu >> >> Signed-off-by: Andrew Halaney >> >> --- >> >> Hello, >> >> >> >> I ran into a warning caused by this, and I think the warning is >> >> incorrect. Please let me know if I'm wrong! >> >> I'm working off of linux-5.12.y-rt, but this applies cleanly to older >> >> stable branches as well. >> >> >> >> Thanks, >> >> Andrew >> >> >> >> kernel/locking/rwsem-rt.c | 1 - >> >> 1 file changed, 1 deletion(-) >> >> >> >> diff --git a/kernel/locking/rwsem-rt.c b/kernel/locking/rwsem-rt.c >> >> index 274172d5bb3a..b61edc4dcb73 100644 >> >> --- a/kernel/locking/rwsem-rt.c >> >> +++ b/kernel/locking/rwsem-rt.c >> >> @@ -198,7 +198,6 @@ void __up_read(struct rw_semaphore *sem) >> >> if (!atomic_dec_and_test(&sem->readers)) >> >> return; >> >> >> >> - might_sleep(); >> >> raw_spin_lock_irq(&m->wait_lock); >> >> /* >> >> * Wake the writer, i.e. the rtmutex owner. It might release the >> >> -- >> >> 2.30.2 >> > >> > Just a gentle follow up, any feedback? >> >> Looks correct. Will go into the next rt-release. >> >> Thanks, >> >> tglx >> > > Hi Thomas, > > I see a new release (v5.13-rt1) was created, and with it rwsem > was overhauled entirely making this patch pointless for linux-rt-devel. > > That being said, it's a little unclear to me how RT only patches > make their way to the maintained branches over in linux-stable-rt. > I think it should be applied to: > v4.9-rt > v4.14-rt > v4.19-rt > v5.4-rt > v5.10-rt > to remove the incorrect warning, unless those branches plan to backport > the latest RT patchset with the new rwsem implementation. Is there a > proper way for me signal that? See Cc. Thanks, tglx