mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Leonardo de Sá Alt" <leonardoaltt@gmail.com>
To: mingo@elte.hu
Cc: linux-kernel@vger.kernel.org,
	"Leonardo de Sá Alt" <leonardoaltt@gmail.com>
Subject: [PATCH] x86, hpet.c: Changed delayed_work to work when delay is 0
Date: Sat, 15 May 2010 12:27:47 -0300	[thread overview]
Message-ID: <1273937267-11794-1-git-send-email-leonardoaltt@gmail.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1197 bytes --]

Here a delayed_work was used with delay 0, so it was changed to work.
It avoids a timer set up and the work is directly queued, providing
less use of memory and more performance.

I've tried to send this patch to Venkatesh Pallipadi, the creator of the code I changed (venkatesh.pallipadi@intel.com), but "the message was rejected by the recipient domain".

Signed-off-by: Leonardo de Sá Alt <leonardoaltt@gmail.com>

---
 arch/x86/kernel/hpet.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index a198b7c..4516ba1 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -724,12 +724,10 @@ static int hpet_cpuhp_notify(struct notifier_block *n,
 
 	switch (action & 0xf) {
 	case CPU_ONLINE:
-		INIT_DELAYED_WORK_ON_STACK(&work.work, hpet_work);
+		INIT_WORK_ON_STACK(&work.work.work, hpet_work);
 		init_completion(&work.complete);
-		/* FIXME: add schedule_work_on() */
-		schedule_delayed_work_on(cpu, &work.work, 0);
+		schedule_work_on(cpu, &work.work.work);
 		wait_for_completion(&work.complete);
-		destroy_timer_on_stack(&work.work.timer);
 		break;
 	case CPU_DEAD:
 		if (hdev) {
-- 
1.6.0.4


             reply	other threads:[~2010-05-15 15:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-15 15:27 Leonardo de Sá Alt [this message]
2010-05-18  1:36 ` Venkatesh Pallipadi
  -- strict thread matches above, loose matches on Subject: below --
2010-05-15 15:15 [PATCH] x86:hpet.c: " Leonardo de Sá Alt

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=1273937267-11794-1-git-send-email-leonardoaltt@gmail.com \
    --to=leonardoaltt@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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®