lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YxogbSDYhsmp3CNC@hirez.programming.kicks-ass.net>
Date:   Thu, 8 Sep 2022 19:03:41 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Mukesh Ojha <quic_mojha@...cinc.com>
Cc:     mingo@...hat.com, will@...nel.org, longman@...hat.com,
        boqun.feng@...il.com, linux-kernel@...r.kernel.org,
        Gokul krishna Krishnakumar <quic_gokukris@...cinc.com>
Subject: Re: [PATCH] locking/rwsem: Disable preemption while trying for rwsem
 lock

On Thu, Sep 08, 2022 at 09:18:29PM +0530, Mukesh Ojha wrote:
> Hi Peter,
> 
> Thanks for your time in reviewing this patch.
> 
> On 9/8/2022 8:02 PM, Peter Zijlstra wrote:
> > On Thu, Sep 01, 2022 at 03:58:10PM +0530, Mukesh Ojha wrote:
> > > From: Gokul krishna Krishnakumar <quic_gokukris@...cinc.com>
> > > 
> > > Make the region inside the rwsem_write_trylock non preemptible.
> > > 
> > > 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.
> > > 
> > > This patch attempts to fix the above issue by disabling preemption
> > > until owner is set for the lock. while at it also fix this issue
> > > at the place where owner being set/cleared.
> > > 
> > > Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@...cinc.com>
> > > Signed-off-by: Mukesh Ojha <quic_mojha@...cinc.com>
> > 
> > This is not a valid SoB chain.
> 
> Since this patch of adding preempt disable() at rwsem_write_trylock() is
> originated from Gokul.
> 
> Would be adding him in
> Original-patch-by: Gokul krishna Krishnakumar <quic_gokukris@...cinc.com>
> 
> Convert myself to the author/SoB.
> 

Oh, my bad, I missed From is actually Gokul. So yeah, all good, ignore
that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ