From: Pavel Machek <pavel@ucw.cz>
To: domen@coderock.org
Cc: linux-kernel@vger.kernel.org, nacc@us.ibm.com
Subject: Re: [patch 1/1] kernel/smp: replace schedule_timeout() with ssleep()
Date: Sun, 6 Mar 2005 23:24:44 +0100 [thread overview]
Message-ID: <20050306222444.GA3282@elf.ucw.cz> (raw)
In-Reply-To: <20050306222248.254E11EC90@trashy.coderock.org>
Hi!
> Use ssleep() instead of schedule_timeout(). The original code uses
> TASK_INTERRUPTIBLE, but does not check for signals, so I believe the change to
> ssleep() is appropriate.
>
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> Signed-off-by: Domen Puncer <domen@coderock.org>
Actually this code should be rewritten to use cpu hotplug
infrastructure, but this seems simple enough. ACK. [Heh, would be nice
if someone could test it...]
Pavel
> diff -puN kernel/power/smp.c~ssleep-kernel_power_smp kernel/power/smp.c
> --- kj/kernel/power/smp.c~ssleep-kernel_power_smp 2005-03-05 16:11:19.000000000 +0100
> +++ kj-domen/kernel/power/smp.c 2005-03-05 16:11:19.000000000 +0100
> @@ -13,6 +13,7 @@
> #include <linux/interrupt.h>
> #include <linux/suspend.h>
> #include <linux/module.h>
> +#include <linux/delay.h>
> #include <asm/atomic.h>
> #include <asm/tlbflush.h>
>
> @@ -49,8 +50,7 @@ void disable_nonboot_cpus(void)
> printk("Freezing CPUs (at %d)", smp_processor_id());
> oldmask = current->cpus_allowed;
> set_cpus_allowed(current, cpumask_of_cpu(0));
> - current->state = TASK_INTERRUPTIBLE;
> - schedule_timeout(HZ);
> + ssleep(1);
> printk("...");
> BUG_ON(smp_processor_id() != 0);
>
> _
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
prev parent reply other threads:[~2005-03-06 22:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-06 22:22 domen
2005-03-06 22:24 ` Pavel Machek [this message]
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=20050306222444.GA3282@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=domen@coderock.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nacc@us.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®