mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, rui.zhang@intel.com,
	harbour@sfinx.od.ua, pavel@ucw.cz, rjw@sisk.pl
Subject: [PATCH] workqueues: schedule_on_each_cpu() can use schedule_work_on()
Date: Sat, 12 Jul 2008 19:45:00 +0400	[thread overview]
Message-ID: <20080712154500.GC603@tv-sign.ru> (raw)
In-Reply-To: <20080712153234.GA603@tv-sign.ru>

schedule_on_each_cpu() can use schedule_work_on() to avoid the code
duplication.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

--- 26-rc2/kernel/workqueue.c~WQ_3_SOEC_QWON	2008-07-12 19:19:23.000000000 +0400
+++ 26-rc2/kernel/workqueue.c	2008-07-12 19:40:57.000000000 +0400
@@ -689,8 +689,7 @@ int schedule_on_each_cpu(work_func_t fun
 		struct work_struct *work = per_cpu_ptr(works, cpu);
 
 		INIT_WORK(work, func);
-		set_bit(WORK_STRUCT_PENDING, work_data_bits(work));
-		__queue_work(per_cpu_ptr(keventd_wq->cpu_wq, cpu), work);
+		schedule_work_on(cpu, work);
 	}
 	for_each_online_cpu(cpu)
 		flush_work(per_cpu_ptr(works, cpu));


  parent reply	other threads:[~2008-07-12 15:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200807111846.m6BIkeTj031024@imap1.linux-foundation.org>
2008-07-12 15:32 ` [PATCH] pm-introduce-new-interfaces-schedule_work_on-and-queue_work_on-cleanup Oleg Nesterov
2008-07-12 15:35   ` [PATCH] workqueues: queue_work() can use queue_work_on() Oleg Nesterov
2008-07-12 15:45   ` Oleg Nesterov [this message]
2008-07-12 16:21 ` + pm-introduce-new-interfaces-schedule_work_on-and-queue_work_on.patch added to -mm tree Oleg Nesterov
2008-07-22 16:19   ` Gautham R Shenoy
2008-07-24 12:43     ` Oleg Nesterov
2008-07-25  1:17       ` Zhang Rui
2008-07-25  9:42         ` Oleg Nesterov
2008-08-05 19:57           ` Pavel Machek
2008-08-06 12:45             ` Oleg Nesterov

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=20080712154500.GC603@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=akpm@linux-foundation.org \
    --cc=harbour@sfinx.od.ua \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --cc=rui.zhang@intel.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®