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] [day] [month] [year] [list]
Message-ID: <CADZ9YHhA7BO+zRJdJvpSWuGdK316A07gNS5g3Ty=2ZpxZ--N5w@mail.gmail.com>
Date:	Tue, 17 Jan 2012 21:33:33 +0600
From:	Rakib Mullick <rakib.mullick@...il.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	peterz@...radead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched: Update scheduler stat documentation.

On Tue, Jan 17, 2012 at 3:50 PM, Ingo Molnar <mingo@...e.hu> wrote:
>
> * Rakib Mullick <rakib.mullick@...il.com> wrote:
>
>> On Mon, Jan 16, 2012 at 2:36 PM, Ingo Molnar <mingo@...e.hu> wrote:
>> >
>> >
>> > Yes - but we should also change it to export a value of zero.
>> > The field is a legacy 'array expirations' field, and as such it
>> > should be zero.
>> >
>>
>> Ok, thanks for suggestions. Please, look at the following patch, it's
>> been roughly created to address your suggestion. If it looks okay,
>> then I can send formal patch (perhaps two separate patches?). In this
>> way, I think we can also remove rq->sched_switch field (not done in
>> this patch)?
>>
>> diff --git a/Documentation/scheduler/sched-stats.txt
>> b/Documentation/scheduler/sched-stats.txt
>> index 1cd5d51..cc2d107 100644
>> --- a/Documentation/scheduler/sched-stats.txt
>> +++ b/Documentation/scheduler/sched-stats.txt
>> @@ -38,7 +38,8 @@ First field is a sched_yield() statistic:
>>       1) # of times sched_yield() was called
>>
>>  Next three are schedule() statistics:
>> -     2) # of times we switched to the expired queue and reused it
>> +     2) This field is a legacy array expiration field used in O(1) scheduler.
>> +     But still kept for ABI integrity.
>
> I'd formulate it like this:
>
>> +     2) This field is a legacy array expiration count field
>> +        used in the O(1) scheduler. We kept it for ABI
>> +        compatibility, but it is always set to zero.
>
Okay, I'll take the above description.

>
>> +             int rq_sched_switch = 0;
>>  #ifdef CONFIG_SMP
>>               struct sched_domain *sd;
>>               int dcount = 0;
>> @@ -34,7 +35,7 @@ static int show_schedstat(struct seq_file *seq, void *v)
>>               seq_printf(seq,
>>                   "cpu%d %u %u %u %u %u %u %llu %llu %lu",
>>                   cpu, rq->yld_count,
>> -                 rq->sched_switch, rq->sched_count, rq->sched_goidle,
>> +                 rq_sched_switch, rq->sched_count, rq->sched_goidle,
>
> printf can print a 0 value just fine as part of the format
> string ... :-)
>
Umm... actually, I thought using a variable would have been nice to
indicate it's purpose rather straightly putting 0. Anyway, will change
it.

> But yeah, this logic is what i had in mind.
>
I was confused what you asked for cause present code returns 0 too.
Now got it, will send a patch shortly.

Thanks,
Rakib

> Thanks,
>
>        Ingo
--
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