[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.01.0911030748430.31845@localhost.localdomain>
Date: Tue, 3 Nov 2009 07:51:25 -0800 (PST)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Ian Campbell <Ian.Campbell@...rix.com>
cc: Andrew Morton <akpm@...ux-foundation.org>,
Rusty Russell <rusty@...tcorp.com.au>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Correct nr_processes() when CPUs have been unplugged
On Tue, 3 Nov 2009, Ian Campbell wrote:
>
> Therefore calculating the sum of process_counts over only the online
> CPUs omits the processes which were started or stopped on any CPU which
> has since been unplugged. Only the sum of process_counts across all
> possible CPUs has meaning.
I think your patch is fine, but I also suspect that we could/should
instead fix it by doing something like
per_cpu(process_counts, this_cpu) += per_cpu(process_counts, down_cpu);
per_cpu(process_counts, down_cpu) = 0;
in the CPU off-lining case after having quieted 'down_cpu'. That way we
could always use online CPU's rather than possible CPU's. I think that
just sounds nicer.
So I'll apply the patch, but I get the feeling it could be done better.
Linus
--
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