Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp507780lqp; Thu, 4 Apr 2024 23:32:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWK6bGsBYehHGgBup+WQS1Kd5yAhm/L3aNi9iEScupilCjqC6Fb6KJ6Df2jVz8PWykr+J2diNlDAEVL2jSlDDOEZPfs4HsGT28z64NN2g== X-Google-Smtp-Source: AGHT+IEFjMbiVWBThgR6FJRI4ho4yepBXzvVvpvEWGw8e0zjSxGi9JfeW5ovRoipJA4eeVtC2Ib+ X-Received: by 2002:a50:99da:0:b0:56d:f637:4515 with SMTP id n26-20020a5099da000000b0056df6374515mr273225edb.42.1712298767209; Thu, 04 Apr 2024 23:32:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712298767; cv=pass; d=google.com; s=arc-20160816; b=G6XtSVhYVNGsUakipFVHkqgT+QYwW8UWNAmzsp9Hm1y2MgI07vigEzCxSnLWbYvmw/ JsZ5XTRQVDVmK21wnwqGpQ7rsmySEu3a8enqBdMRZGmaXSg49hPzskP+ybBwV9vA4Jrq 54b4PYuFGi6U50dzTNqYVdMCgC3NObEuw0mjSP/O/sGB3qWm/oUjFXxnp0C/8pVwUAtv /ADWuBhaifai7MZVIVFMR7RrEq9TrBNflQ0Q35qnc0EKp0HTGXONTvWOqEyPkolACMR6 B0pEBly1F+ZqW3LWol4okwyhvPZHo/VYZLB3yXWZN6ZG8gRmXa9LXZij1VIis3pRViAM EgOw== 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=t4+5jZf3BkfUZI1I5uYMFOU6bl7C+6zwa5GUYyPimCc=; fh=m7SlOCP1xeyPmL9nKrGIp4A2ZjWjEksTPBCFNXvkK4g=; b=bCIjIepQRlyUZGfZ2y0K81W5u91CepHs3haZyjgmr7i4iUPH8H+85PbqKdYoMwZhvN EmVRNEKRYG1/YLmBSXdWaUvxnfCuSADGFm1vIy1LRmIRGmIF+kROw9UOBWaeq9Zs6Iwo G8hQhMEss9XvJO6NqZIMvm0RHp2OX6q7fXtlRvsdxeRc09X6fX+24k1kflBnLeE4MfXX xZmn6pVFNW5mUDo7Jr0HyDfmkTHHZvgFhgc5ofnL+ka8XRCkY4i+vJXC9OUB4owRf+xy yQlwNaghL/tYFAB/doGA/4EO7ubohNR2oAPm+erm1tXwnW5QR6PSw9jzxn8mTXUfw65K 4aWg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SrA1e7hd; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-132471-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132471-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id z13-20020a05640240cd00b00568e9094970si411437edb.680.2024.04.04.23.32.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 23:32:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132471-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SrA1e7hd; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-132471-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132471-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 am.mirrors.kernel.org (Postfix) with ESMTPS id EB1B21F22644 for ; Fri, 5 Apr 2024 06:32:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1C7D01C290; Fri, 5 Apr 2024 06:32:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="SrA1e7hd" 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 3E0E71370; Fri, 5 Apr 2024 06:32:37 +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=1712298758; cv=none; b=DllL9FY0KaxJsRy7cQwT5CV3cAHGuQFiqiPYp1EdzACxTUlTFI2bIU5EUpSWd/E0x1e7YLjcFTmn2UlZIuRDiV4yp/21cu8S+9mtgF0k55NmJYymSzc/bCZtTijK2A/9CZPs6o6ShuNU8owMVoYprSLpj05g97owOT+0PQUa5lM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712298758; c=relaxed/simple; bh=yrYj/fn0Es5aNmP/WwiDYBJAbAsdwC7f18uD7wJoyz4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=M1r0mO8gDZdis3tZJ02nLqnCvpgAox6XAI9ErjNubnkGIm6nV5XRfrYbSwGSh/N3Zxvcun+zGmayCANKWVMaio5BHotctB/iHHd2tam/AuXRNd2IrhXyOM/w4tog7Vr8kyFSY/Z4zZ5bsAuU6W1DLh/RmkPmoy3UJF/RGUYGJ8I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SrA1e7hd; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D799C433F1; Fri, 5 Apr 2024 06:32:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712298757; bh=yrYj/fn0Es5aNmP/WwiDYBJAbAsdwC7f18uD7wJoyz4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SrA1e7hdU6jDlvPeaJ3+Tq2YiTOMH1PdQ2NqunpMiWAQTfd+B+EAYwHe4rGDzQ/TZ N8rZJQv0JgUkz3mCs7nEuiGkCYXA0cdt496cafcUO8IDiJidNiELtJEqVOf90YDgSy eIRny3aH6IAGz3OHrcAnisfx2vLinzdS+sb5Pskw= Date: Fri, 5 Apr 2024 08:32:35 +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: <2024040524-skier-snippet-74eb@gregkh> References: <1662661467-24203-1-git-send-email-quic_mojha@quicinc.com> <20240305110402.GA72649@darkstar.musicnaut.iki.fi> <20240402173032.GC91663@darkstar.musicnaut.iki.fi> <2024040242-babbling-dreamy-6336@gregkh> <20240402182511.GD91663@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: <20240402182511.GD91663@darkstar.musicnaut.iki.fi> On Tue, Apr 02, 2024 at 09:25:11PM +0300, Aaro Koskinen wrote: > Hi, > > On Tue, Apr 02, 2024 at 07:42:03PM +0200, Greg KH wrote: > > 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? > > It's with a normal "clean" kernel. Fair enough, now queued up, thanks. greg k-h