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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46698E50.6030108@de.ibm.com>
Date:	Fri, 08 Jun 2007 19:13:52 +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 Wed, 2007-06-06 at 23:34 +0200, Martin Peschke wrote:
> 
>> +struct statistic_info lock_stat_info[_LOCK_STAT_NUMBER] = {
>> +	[LOCK_STAT_CONT] = {
>> +		.name	  = "contentions",
>> +		.x_unit	  = "instruction_pointer",
>> +		.y_unit	  = "occurrence",
>> +		.defaults = "type=sparse entries=4",
>> +		.flags	  = STATISTIC_FLAGS_LABEL,
>> +	},
>> +	[LOCK_STAT_WAIT_READ] = {
>> +		.name	  = "wait_read",
>> +		.x_unit	  = "nanoseconds",
>> +		.y_unit	  = "occurrence",
>> +		.defaults = "type=utilisation",
>> +	},
>> +	[LOCK_STAT_WAIT_WRITE] = {
>> +		.name	  = "wait_write",
>> +		.x_unit	  = "nanoseconds",
>> +		.y_unit	  = "occurrence",
>> +		.defaults = "type=utilisation",
>> +	},
>> +	[LOCK_STAT_HOLD_READ] = {
>> +		.name	  = "hold_read",
>> +		.x_unit	  = "nanoseconds",
>> +		.y_unit	  = "occurrence",
>> +		.defaults = "type=utilisation",
>> +	},
>> +	[LOCK_STAT_HOLD_WRITE] = {
>> +		.name	  = "hold_write",
>> +		.x_unit	  = "nanoseconds",
>> +		.y_unit	  = "occurrence",
>> +		.defaults = "type=utilisation",
>>  	}
>>  };
> 
> You're parsing strings in-kernel to setup data structures?

Might be surprising (or revolting?)... but, yes, I do.

.defaults reflects the developers opinion on the way of data
accumululation that might make most sense in most cases.
The current implementation of lib/statistic.c allows users to change
setting that we see in .defaults. If one needs to track more than
4 contention points, for example, then they can change this limit by
passing "entries=4" to the user interface. So there is some parsing
code anyway. Passing default setting in a similar fashion has just been
convenient for the developer.

-
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