Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp3853714pxy; Mon, 26 Apr 2021 11:17:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYBDDI0baSOh90S+/sKiyRz0whfsjUo8kvIy/OuL8XO1mR8vAft4mncHzwbEZNSkTP/Suq X-Received: by 2002:a17:906:590b:: with SMTP id h11mr7583035ejq.147.1619461074903; Mon, 26 Apr 2021 11:17:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619461074; cv=none; d=google.com; s=arc-20160816; b=pr3+CbKpExhfSt4IfLcUyJDlA+gIKPr9TcV6aTvK+0PH5DXDP3EHWy0VIoR6ZrNC5x zAlkD4ugHqMY/qUqR3CuBz/VG3m5qVFb1SwaqcYzOpcP6JnB6N8RODG0O1zx+AFEmjQk YhsAataniq8HdjGhJpUoeRwuTb6Lw+JrwfoiI3M2/iRWWEjli2b5Xt3sCAmub8rrBbCz jUGYGxstts59Y9kyuW/MuHFcWlEOPx2Ls6mmQ3cbDVvT2aH5VqmvLC2TGNp//WC+/50w h4KfYGEQbHQa7WT81efllT35049zOmG6cUL9i/AZzciXb17ueiqdd8P98gz5VrfX4DWn S0JA== 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=AHCsbCINwquHCC6obELde1nEQozsYpFcoZNX5wyKzFc=; b=r+Q9aYcq6GXIuw8m8/+zCpL7I8LLEUL4ZDK0iyOo/6qlXhskCfyJWPgg1r8flHb4tR fl/ifv8kVN2sKeJNmRH3JH2NngE71O8yM0iaNy2LkMdJdQN6N3UBeyan3OaIWz9MFGsD MupgZnGISfQMh8We0sfLjpdNMhMJlliHhIoJ0NvxCyaiV0gRs+HEdGhSBRX0Y1EqCx/3 v0UUqPl4ByF45Ta4nF7DdsUOS31RXbqe5l85p5c0bUPcQlWMG8v/N0CzxGb5c5iQQ5/i xUCkHRHzADMV6899uGRqcZC+GhP4iT3B+YdQtrSWs/iW4HSTKaNkG5FZ6RF+AQD/9qY6 rkrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=1DrvPQ2Z; dkim=neutral (no key) header.i=@linutronix.de; 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=pass (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 cq27si439810edb.454.2021.04.26.11.17.29; Mon, 26 Apr 2021 11:17:54 -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=@linutronix.de header.s=2020 header.b=1DrvPQ2Z; dkim=neutral (no key) header.i=@linutronix.de; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234146AbhDZSRU (ORCPT + 99 others); Mon, 26 Apr 2021 14:17:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233842AbhDZSRU (ORCPT ); Mon, 26 Apr 2021 14:17:20 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D3D5C061574; Mon, 26 Apr 2021 11:16:37 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1619460995; 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=AHCsbCINwquHCC6obELde1nEQozsYpFcoZNX5wyKzFc=; b=1DrvPQ2ZmpAF3/f9DX3TmlLiEVBuZyUhyMwLaxrdmAN9xlUOsRka/4z+jmgK6rGOM+u5Hz j+Pj8vpSS/u7nFOaIiJF0O0nCaPrFD0eJWxs5ViNFhCahLCjbGyF0sSw5NLYZ44o4MpuYI RaKrkN4Y6GLsF9N75O4Kj/rIGkFMQk9ZZjYRx2M5mw0mPYZzaDQCfipOjdFXHj7GsVFffX j9iTuxRaiMEFyzWLrszdPIhk94ku3aVw7e+kvyoX1/oXLz0LTXmT3fbZDPqsBkYxfIsSvs Y51ZjQQeJFq0Q8VBX6yjTeFwZDOxUOF1v4RpMMADWFUTV7g3I+33VOdkYcrAGg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1619460995; 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=AHCsbCINwquHCC6obELde1nEQozsYpFcoZNX5wyKzFc=; b=3sc6MvKYcZjN8CH0aiWBsyauKAvHhq0huZ52O8XDEVh8bZ871nJRs1Os+hAgPezwj5kW2L cpw6jYTsICoVDsAA== To: Andrew Halaney , bigeasy@linutronix.de Cc: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org, Chunyu Hu Subject: Re: [RT PATCH] locking/rwsem-rt: Remove might_sleep() in __up_read() In-Reply-To: <20210426164229.mbrsrjpmmhp7ehna@halaneylaptop> References: <20210406221952.50399-1-ahalaney@redhat.com> <20210426164229.mbrsrjpmmhp7ehna@halaneylaptop> Date: Mon, 26 Apr 2021 20:16:34 +0200 Message-ID: <877dkoud19.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 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