All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Thomas Hood <jdthood@yahoo.co.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Documentation/preempt-locking.txt clarification
Date: Wed, 10 Nov 2004 00:57:42 -0800	[thread overview]
Message-ID: <20041110005742.35828d2b.akpm@osdl.org> (raw)
In-Reply-To: <1100074907.3654.780.camel@thanatos>

Thomas Hood <jdthood@yahoo.co.uk> wrote:
>
> I have tried to clarify the text while at the same time
>  preserving the original meaning.  Everything is pretty clear
>  now except for the last paragraph which I still find baffling.
>  I don't know what "a test to see if preemption is required" is
>  exactly and I don't understand when such a test is required.

I guess it's saying that if you do this:

	local_irq_disable();
	lah_de_dah();
	local_irq_enable();

then you should follow that by

	preempt_check_resched();

just in case someone told this task to preempt itself while it had
interrupts disabled.

But I don't see why that's needed: if the preempt command came from another
CPU then this CPU will take the cross-CPU interrupt as soon as interrupts
are enabled.  And the preempt command couldn't have come from _this_ CPU,
because it had interrupts disabled.


  reply	other threads:[~2004-11-10  8:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1073302283.1903.85.camel@thanatos.hubertnet>
     [not found] ` <1074561880.26456.26.camel@localhost>
2004-11-10  8:21   ` [PATCH] Documentation/preempt-locking.txt clarification Thomas Hood
2004-11-10  8:57     ` Andrew Morton [this message]
2004-11-10  9:27       ` Thomas Hood
2004-11-10  9:45         ` Andrew Morton
2004-11-10 10:59           ` Ingo Molnar
2004-11-10 11:03       ` Ingo Molnar

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=20041110005742.35828d2b.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=jdthood@yahoo.co.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.