Re: mmotm 2009-04-10-02-21 uploaded - forkbombed by work_for_cpu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 13 Apr 2009 10:45:45 -0700 (PDT)
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> 
> 
> 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?
> 

Didn't know it existed :(
--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux