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:	Fri, 08 Jun 2007 19:37:19 +0200
From:	Martin Peschke <mp3@...ibm.com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
CC:	linux-kernel@...r.kernel.org, jbaron@...hat.com,
	rostedt@...dmis.org, billh@...ppy.monkey.org, mingo@...e.hu,
	linux-s390@...r.kernel.org
Subject: Re: [RFC] [Patch 4/4] lock contention tracking slimmed down

Peter Zijlstra wrote:
> On Fri, 2007-06-08 at 19:18 +0200, Martin Peschke wrote:
>> Peter Zijlstra wrote:
>>> On Fri, 2007-06-08 at 19:00 +0200, Martin Peschke wrote:
>>>> Peter Zijlstra wrote:
>>>>> I'm confused as to where the class->stat objects are initialised? Is
>>>>> that done in lock_stat_init()? If so, then you have a bug.
>>>> static struct lock_class lock_classes[MAX_LOCKDEP_KEYS];
>>>>
>>>> I assume this gets us class structures containing all zeros, doesn't it?
>>>> Then class->stat is zeros as well, which is handled by lib/statistics.
>>>> (In this case, data gathering hasn't been turned on yet, and statistic_inc()
>>>> and similar functions don't access other areas of struct statistic.)
>>> Who eventually calls percpu_alloc?
>> There is a small state machine calling percpu_alloc when users do
>>
>>     echo state=on > /debug/statistics/lockdep/definition
>>
>> So data gathering is off by default.
>>
>> It might make sense to allow "state=on" as a default. Then allocation would
>> be done in the context of statistic_attach().
> 
> Right, the problem here is that you iterate over all_lock_classes once
> at init.
> 
> Contrary to what the name might suggest, it are not all possible
> classes, just all active ones. So you'll only attach the classes which
> have been used up until the init point. All other classes used later
> will never be initialized.

Ah..

Do you know where a class is setup for first use?
I guess it is feasible to move statistic initialisation to that place.

Is there a place where a class becomes unused again?


-
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