mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kay Tiong Khoo <kaytiong@gmail.com>
To: Hagen Paul Pfeifer <hagen@jauu.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: stopping a process during a timer interrupt
Date: Thu, 19 Oct 2006 11:38:00 +0800	[thread overview]
Message-ID: <8AC92F9D-9E69-4332-9165-7B98C16D5050@gmail.com> (raw)
In-Reply-To: <20061017225603.GA15846@c3po.0xdef.net>

Thanks!

For the record, I was trying to sleep kernel threads as well as user  
threads. That didn't work out too well.

All worked fine when I only attempted to sleep user threads.

Kay Tiong

On Oct 18, 2006, at 6:56 AM, Hagen Paul Pfeifer wrote:

> * Kay Tiong Khoo | 2006-10-17 18:18:25 [+0800]:
>
>> On a timer interrupt, I tried to stop the current process by changing
>> it's run state to TASK_STOPPED via set_current_state(TASK_STOPPED).
>> However, this results in a system hang.
>>
>> I can't find a way to stop the current process during an interrupt
>> context. Does such code exist in the kernel? If not, how does one go
>> about implementing it from within a kernel module.
>
> Take a look at some driver implementations!
> There you will find some ways how to put a process into a sleep state.
>
> Grep for "*->state*TASK_UNINTERRUPTIBLE" and take also a look at the
> interaction with schedule() and spinlocks.
>
>> Thanks.
>> Kay Tiong
>
> Best regards
>
> -- 
> Hagen Pfeifer


  reply	other threads:[~2006-10-19  3:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <d0bd1c10610170311s3ef77226n1d645f3f1e178753@mail.gmail.com>
2006-10-17 10:18 ` Kay Tiong Khoo
2006-10-17 22:56   ` Hagen Paul Pfeifer
2006-10-19  3:38     ` Kay Tiong Khoo [this message]
2006-10-18 14:30   ` Michal Schmidt
2006-10-19  3:42     ` Kay Tiong Khoo

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=8AC92F9D-9E69-4332-9165-7B98C16D5050@gmail.com \
    --to=kaytiong@gmail.com \
    --cc=hagen@jauu.net \
    --cc=linux-kernel@vger.kernel.org \
    /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®