mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dipankar Sarma <dipankar@in.ibm.com>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Gautham R Shenoy <ego@in.ibm.com>,
	rusty@rustcorp.com.au, torvalds@osdl.org, akpm@osdl.org,
	linux-kernel@vger.kernel.org, arjan@intel.linux.com,
	mingo@elte.hu, davej@redhat.com, vatsa@in.ibm.com,
	ashok.raj@intel.com
Subject: Re: [RFC][PATCH 2/4] Revert Changes to kernel/workqueue.c
Date: Thu, 24 Aug 2006 16:33:06 +0530	[thread overview]
Message-ID: <20060824110306.GB3651@in.ibm.com> (raw)
In-Reply-To: <20060824105100.GA6868@osiris.boeblingen.de.ibm.com>

On Thu, Aug 24, 2006 at 12:51:00PM +0200, Heiko Carstens wrote:
> > @@ -510,13 +515,11 @@ int schedule_on_each_cpu(void (*func)(vo
> >  	if (!works)
> >  		return -ENOMEM;
> >  
> > -	mutex_lock(&workqueue_mutex);
> >  	for_each_online_cpu(cpu) {
> >  		INIT_WORK(per_cpu_ptr(works, cpu), func, info);
> >  		__queue_work(per_cpu_ptr(keventd_wq->cpu_wq, cpu),
> >  				per_cpu_ptr(works, cpu));
> >  	}
> > -	mutex_unlock(&workqueue_mutex);
> >  	flush_workqueue(keventd_wq);
> >  	free_percpu(works);
> >  	return 0;
> 
> Removing this lock without adding a lock/unlock_cpu_hotplug seems wrong,
> since this function is walking the cpu_online_map.

As long as you disable preemption and don't block the critical
section should be safe from cpu hotplug. There is no need to 
lock/unlock cpu hotplug.

Thanks
Dipankar

  parent reply	other threads:[~2006-08-24 11:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-24 10:30 Gautham R Shenoy
2006-08-24 10:51 ` Heiko Carstens
2006-08-24 11:02   ` Gautham R Shenoy
2006-08-24 11:03   ` Dipankar Sarma [this message]
2006-08-24 11:13     ` Heiko Carstens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060824110306.GB3651@in.ibm.com \
    --to=dipankar@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=arjan@intel.linux.com \
    --cc=ashok.raj@intel.com \
    --cc=davej@redhat.com \
    --cc=ego@in.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rusty@rustcorp.com.au \
    --cc=torvalds@osdl.org \
    --cc=vatsa@in.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®