Received: by 2002:a05:7208:3003:b0:81:def:69cd with SMTP id f3csp4248398rba; Tue, 2 Apr 2024 11:16:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV5R2I69cQ3GEXur0Kmke2BrqHlZEt1f3Mgpchgn719cNdazO70hGM0gpEK6RhpxhjjTfkvtcX9TqK/TZH81bKel8tb92YnUunMIVxe1w== X-Google-Smtp-Source: AGHT+IGx0QHDnGRifg1QfvHDsz5uHwfxClpL40MSUOL7doFHZwcKeoOuE6Pl9MjdNthT44sCV7/2 X-Received: by 2002:a17:90a:6b02:b0:2a2:1eb3:6c6e with SMTP id v2-20020a17090a6b0200b002a21eb36c6emr7875925pjj.28.1712081772455; Tue, 02 Apr 2024 11:16:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712081772; cv=pass; d=google.com; s=arc-20160816; b=SnhqCl86AtRRKfd5GhEyZrzU6IQuLT1xqZBPRRlprWQttumXsfcXTSEqGtoMYEP7zg be99zBa7chE3uKuHPkQ5ZzRqjRgE1Sr1L848/RrXNiEQ1CM0xYqA+/R/kckiVPUW+jQx 7rMNb0HTV1qSalGAVK5fbdNY0+m8PLoX3uv4Fcktq3O6KFqVhqf+zL7H9Z5epdt/d9gF AwmIBvtaNsALzoz1vPJnTzvuXYCPpEwQBJgCn4RQ+ZOHDn1NQJreDdPng6XKvwfCZOXT kgSCnosu61kZnDRpTtW2mEcYddoBiDO9FyHqCtWWQbU2IqgeOf70hO03EqpJm6dpVRAF THYA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=RanyiqjezRfiPJeIbWmN+8u8oATrDd0+1WKBxgblxRc=; fh=m7SlOCP1xeyPmL9nKrGIp4A2ZjWjEksTPBCFNXvkK4g=; b=DBLcKMNabDy4Ca143AqHa2dZ7JgVuKAFI84dEGSqa8jF2r7P/VDgLQbeJ0UMhJqr9T xoMpzVJbBD2w3x7ygbs+szf/oF4MR79b+3OknujCZ8woM1K49ZWwDu93K0RQKd7SMNCs YJyIj7uPS1BYk8ZOLggqpJwUKM0MZJBfJTkw0Yzzq1xo6hESNpwF2R8ZcOMhIY1y4dox vitABBk6FjXb+lZ1Lv1HsL5ub/VbKhgWBDFJmnWypZQYK2rfycoCpclxRLZK/Mmnzqx5 Hxc8OZi1szMerNGsOJVvhOiQ83n+L6y+ycGc/IMiUlg4dHt27ZUhQSLJOpC/2S40uZzQ I3vw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BtgiPMbD; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-128444-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128444-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id fz14-20020a17090b024e00b0029fff93fd91si13593220pjb.12.2024.04.02.11.16.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 11:16:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-128444-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BtgiPMbD; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-128444-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128444-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 5422BB2809F for ; Tue, 2 Apr 2024 17:42:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 121AD15AAA7; Tue, 2 Apr 2024 17:42:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="BtgiPMbD" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1657414B067; Tue, 2 Apr 2024 17:42:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712079727; cv=none; b=MCxSgo8Bza5DK2iW6RVK1gcx9Rg9xL7U+AATIgbHHI8YO+wUOjB3Ol0sAL2EVd+exmyUPwOTkQShtQRaW/hmCg/Lpm7y+ybgLK3ETF0AlhEu5CECch9NcwDQSILx5ESS2vUxr5/xEodjJkbDqiHjrhfatAX1NKrxMUIKERYe1t0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712079727; c=relaxed/simple; bh=BrDjhKToCvZXQ/w26Dks7chfGTkAyS0yX32TLHZK2tQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZwJuzz7H0ZWQOIYPxSRovXVbiw3Xq/AVpC0TqriBNWLGMrP2JZ3yg6IOE0OtI0BiemwO3lkRnpe7jeaWSkX5J5JBO7Pc+pyhHjSeMzb9Y0YpCvwOyg8xK5MNJa46BUl32RnOeBKfvTHeyzBnPNTJaqr/MrUp096hCa3hg3EQQ5Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=BtgiPMbD; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51A1AC433F1; Tue, 2 Apr 2024 17:42:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712079726; bh=BrDjhKToCvZXQ/w26Dks7chfGTkAyS0yX32TLHZK2tQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BtgiPMbDy0VIISBkRFQaq0D4WK1FnnThJUzfmJ1miE6fNqFmI3HjqeTo6jcuD5zzW k+D4tu0bMTqpCcaVQnjwfnt2HO5DCqDnsyzfOLYIYMTaIWQnGkv0Rb7XAG/D+9XuRQ uAaC1hbV2ammzAw9z5e7BltKuXLDjNRRL9HTPMQw= Date: Tue, 2 Apr 2024 19:42:03 +0200 From: Greg KH To: Aaro Koskinen Cc: stable@vger.kernel.org, Waiman Long , Mukesh Ojha , Peter Zijlstra , mingo@redhat.com, will@kernel.org, boqun.feng@gmail.com, linux-kernel@vger.kernel.org, Gokul krishna Krishnakumar Subject: Re: [PATCH v2] locking/rwsem: Disable preemption while trying for rwsem lock Message-ID: <2024040242-babbling-dreamy-6336@gregkh> References: <1662661467-24203-1-git-send-email-quic_mojha@quicinc.com> <20240305110402.GA72649@darkstar.musicnaut.iki.fi> <20240402173032.GC91663@darkstar.musicnaut.iki.fi> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240402173032.GC91663@darkstar.musicnaut.iki.fi> On Tue, Apr 02, 2024 at 08:30:32PM +0300, Aaro Koskinen wrote: > Stable team, > > Please cherry-pick this patch into v5.15 stable: > > locking/rwsem: Disable preemption while trying for rwsem lock > > commit 48dfb5d2560d36fb16c7d430c229d1604ea7d185 > > It fixes the following bug present in v5.15: > > > > > From: Gokul krishna Krishnakumar > > > > We observe RT task is hogging CPU when trying to acquire rwsem lock > > > > which was acquired by a kworker task but before the rwsem owner was set. > > > > > > > > Here is the scenario: > > > > 1. CFS task (affined to a particular CPU) takes rwsem lock. > > > > > > > > 2. CFS task gets preempted by a RT task before setting owner. > > > > > > > > 3. RT task (FIFO) is trying to acquire the lock, but spinning until > > > > RT throttling happens for the lock as the lock was taken by CFS task. > > If the RT throttling is disabled, the RT task will remain looping forever > in the kernel. If the system is UP, it will lock up completely. > > The issue can be easily reproduced by running RT task and normal task which > are affined to the same CPU core. Does this only affect the -rt patchset, or is this an issue with a "clean" kernel release? thanks, greg k-h