Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752437AbZDMRwl (ORCPT ); Mon, 13 Apr 2009 13:52:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751083AbZDMRwc (ORCPT ); Mon, 13 Apr 2009 13:52:32 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:53020 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750904AbZDMRwb (ORCPT ); Mon, 13 Apr 2009 13:52:31 -0400 Date: Mon, 13 Apr 2009 10:45:45 -0700 (PDT) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Andrew Morton cc: Ingo Molnar , Valdis.Kletnieks@vt.edu, Mike Travis , Linux Kernel Mailing List , mm-commits@vger.kernel.org, Rusty Russell , Dave Jones , Len Brown Subject: Re: mmotm 2009-04-10-02-21 uploaded - forkbombed by work_for_cpu In-Reply-To: <20090413102749.4ca3a217.akpm@linux-foundation.org> Message-ID: References: <200904100922.n3A9MOIV013828@imap1.linux-foundation.org> <4609.1239456126@turing-police.cc.vt.edu> <20090413171853.GA4601@elte.hu> <20090413102749.4ca3a217.akpm@linux-foundation.org> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 816 Lines: 36 On Mon, 13 Apr 2009, Andrew Morton wrote: > > static void drv_write(struct drv_cmd *cmd) > { > - unsigned int i; > + unsigned int cpu; > > - for_each_cpu(i, cmd->mask) { > - work_on_cpu(i, do_drv_write, cmd); > - } > + for_each_cpu(cpu, cmd->mask) > + smp_call_function_single(cpu, do_drv_write, cmd, 1); Ok, that's just -wrong-. Doesn't anybody else see anything odd in doing for_each_cpu(cpu, cmd->mask) smp_call_function_single(cpu, ..); and react to it? IOW, why not just do smp_call_function_many(cmd->mask, do_drv_write, cmd, 1); here? Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/