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, 21 Nov 2008 17:07:43 -0800
From:	Keika Kobayashi <kobayashi.kk@...s.nec.co.jp>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, h-shimamoto@...jp.nec.com,
	Alexey Dobriyan <adobriyan@...il.com>
Subject: Re: [PATCH 2/3] proc: Export statistics for softirq to /proc

> > +/*
> > + * /proc/softirqs  ... display the number of softirqs
> > + */
> > +static int show_softirqs(struct seq_file *p, void *v)
> > +{
> > +	int i, j;
> > +
> > +	seq_printf(p, "                ");
> > +	for_each_online_cpu(i)
> > +		seq_printf(p, "CPU%-8d", i);
> > +	seq_printf(p, "\n");
> > +
> > +	for_each_softirq_nr(i) {
> > +		seq_printf(p, "%-10s", desc_array[i]);
> > +		for_each_online_cpu(j)
> > +			seq_printf(p, "%10u ", kstat_softirqs_cpu(i, j));
> > +		seq_printf(p, "\n");
> > +	}
> > +	return 0;
> > +}
> 
> This uses for_each_online_cpu(), but below we use for_each_possible_cpu().
> 
> Shouldn't we be consistent here so that at least the numbers will add
> up to the same thing?
> 
> Probably for_each_possible_cpu() is best - people might want to see how
> many softirqs happened on a CPU which was recently offlined.

I understand this point. I'll fix it later.

There is same problem regarding /proc/interrupts.
Should we change from for_each_online_cpu() to for_each_possible_cpu(),
or is it too late?
--
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