Re: [PATCH] sysfs: differentiate between locking links and non-links

From: AmÃrico Wang
Date: Tue Feb 09 2010 - 22:12:24 EST


On Wed, Feb 10, 2010 at 10:19 AM, Tejun Heo <tj@xxxxxxxxxx> wrote:
> Hello,
>
> On 02/10/2010 11:08 AM, AmÃrico Wang wrote:
>> This bug report is new for me. Recently we received lots of sysfs lockdep
>> warnings, I am working on a patch to fix all the bogus ones.
>>
>> However, this one is _not_ similar to the other cases, as you decribed.
>> This patch could fix the problem, but not a good fix, IMO. We need more
>> work in sysfs layer to fix this kind of things. I will take care of this.
>
> Can't we just give each s_active lock a separate class? ÂWould that be
> too costly?
>

Not because it is expensive or not, it is because whether it hits the real
problem.

What I am doing is trying to add a "mutable" flag to sysfs files, those files
could be removed from kernel during some changes, e.g. cpu hotplug, I/O
scheduler switch. I add a new lockdep class for all of them, so that will be
safe for all cases like this.

If I understand this case correctly, it is not that different with the
rest cases
that I met, thus should be included into my fix.

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