[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGsJ_4yGBt4Rt=njP=cY++DbEDAWKSyDuuXOC2pXGoJGCvJYFw@mail.gmail.com>
Date: Sat, 31 Jan 2026 10:50:33 +0800
From: Barry Song <21cnbao@...il.com>
To: Chao Yu <chao@...nel.org>
Cc: jaegeuk@...nel.org, linux-f2fs-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] f2fs: fix lock priority inversion issue
On Sat, Jan 31, 2026 at 10:27 AM Chao Yu <chao@...nel.org> wrote:
>
> If userspace thread has held f2fs rw semaphore, due to its low priority,
> it could be runnable or preempted state for long time, during the time,
> it will block high priority thread which is trying to grab the same rw
> semaphore, e.g. cp_rwsem, io_rwsem...
>
> To fix such issue, let's detect thread's priority when it tries to grab
> f2fs_rwsem lock, if the priority is lower than a priority threshold, let's
> uplift the priority before it enters into critical region of lock, and
> restore the priority after it leaves from critical region.
Hi Chao,
Is this even possible if can_nice() returns false, for example due to
missing CAP_SYS_NICE?
Proxy execution [1] is currently under development to address general
priority inversion; hopefully, it will resolve this issue.
[1] https://lpc.events/event/18/contributions/1887/attachments/1402/3074/LPC_%20Proxy%20Exec%20deep%20dive%20outline.pdf
Thanks
Barry
Powered by blists - more mailing lists