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]
Message-ID: <20080102051828.GA24431@suse.de>
Date:	Tue, 1 Jan 2008 21:18:28 -0800
From:	Greg KH <gregkh@...e.de>
To:	Dave Young <hidave.darkstar@...il.com>
Cc:	Greg KH <greg@...ah.com>, Peter Zijlstra <peterz@...radead.org>,
	linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATCH 01/12] Use mutex instead of semaphore in driver core

On Wed, Jan 02, 2008 at 08:54:53AM +0800, Dave Young wrote:
> On Dec 30, 2007 1:07 AM, Greg KH <greg@...ah.com> wrote:
> >
> > On Sat, Dec 29, 2007 at 03:07:30PM +0800, Dave Young wrote:
> > > On Dec 29, 2007 1:06 PM, Dave Young <hidave.darkstar@...il.com> wrote:
> > > >
> > > > On Dec 29, 2007 12:42 PM, Greg KH <gregkh@...e.de> wrote:
> > > > > On Sat, Dec 29, 2007 at 10:36:49AM +0800, Dave Young wrote:
> > > > > > >
> > > > > > The full boot dmesg with lockdep output is out, there's one warnings in it :
> > > > >
> > > > > Please fix that warning before the next repost of these patches (along
> > > > > with fixing the problem of them not being able to be applied and
> > > > > successfully built at every point in the series...)
> > > > >
> > > >
> > > > Ok, thanks, I will fix them and repost.
> > > >
> > >
> > > Hi,
> > > After digging the code, I feel hard to fix the lockdep warning due to
> > > some misterious relationship with usb.
> > >
> > > Could someone help on this? thanks.
> >
> > My question back to you is why are you doing this conversion?  Have you
> > found that it is needed for something?  Are there problems in the -rt
> > kernels that this conversion helps with?  Or is it just a janitorial
> > "convert semaphore to mutex" type thing.
> 
> Sorry for delay-reply because recently I have little free time.
> 
> Mutex is lightweighter than semaphore, the device/class is used
> heavily in kernel, so I think the convert would be worth.

But is the usage of this semaphore in the class code really a problem?
Has it been seen to cause issues anywhere?  Does it show up on any
benchmarks as being something that really needs to be replaced?

All of the places this is used should be on a "slow" code-path, and the
semaphores themselves should very rarely ever have to block anyone under
normal usages.

Without any real problems being reported for this, I wouldn't worry
about this, the effort involved is non-trivial as you are quickly
finding out :)

good luck,

greg k-h
--
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