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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 05 Jan 2011 15:12:00 +0800
From:	Lai Jiangshan <laijs@...fujitsu.com>
To:	Steven Rostedt <rostedt@...dmis.org>
CC:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>
Subject: Re: [RFC][RT][PATCH 4/4] rtmutex: Ensure only the top waiter or higher
 priority task can take the lock

On 01/04/2011 12:02 PM, Steven Rostedt wrote:
> On Thu, 2010-12-23 at 17:47 -0500, Steven Rostedt wrote:
>> plain text document attachment
>> (0004-rtmutex-Ensure-only-the-top-waiter-or-higher-priorit.patch)
>> From: Lai Jiangshan <laijs@...fujitsu.com>
>>
>> In current rtmutex, the pending owner may be boosted by the tasks
>> in the rtmutex's waitlist when the pending owner is deboosted
>> or a task in the waitlist is boosted. This boosting is unrelated,
>> because the pending owner does not really take the rtmutex.
>> It is not reasonable.
>>
> 
> I'm still hitting some bugs with the port to -rt, but I also noticed
> something that doesn't look too good.
> 
> There's several places in the kernel where a task may release and
> acquire the same lock multiple times in a row.
> 
> The old way of removing the pending owner from the lists and waking it
> up once, would have the high prio task wake it up once, and then it can
> grab the locks multiple times without modifying the list, since the
> pending owner is already awake and not in the pi list anymore.
> 
> The new way has the owner remove the woken task from its pi list and
> wakes it up, but when it steals the lock again, it adds this owner back
> to its pi list. When it releases the lock, it wakes it up again and
> removes it from its pi list again. This happens over and over again.

It is a expected behavior.  With this behavior: we can assume that
if a lock has waiter(s), the top waiter is always on the owner's pi list
and the owner gets/(will get) boosted from it.

This simplifies the code and the logic. But performance is more important,
I will send 2 patches for it in this weekend.

Thanks,
Lai.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ