All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Hanquez <tab@snarc.org>
To: lkml <linux-kernel@vger.kernel.org>
Subject: about runqueues locking
Date: Fri, 27 Feb 2004 13:23:11 +0100	[thread overview]
Message-ID: <20040227122311.GA28181@snarc.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

	Hi LKML,

I've got a code for 2.4 which do:

================================================================
spin_lock_irqsave(&runqueue_lock, flags)
for_each_process(p)
{
	// modify p attributes
}
spin_unlock_irqrestore(&runqueue_lock, flags)
================================================================

and I need to translate it to 2.6.
What is exactly the best solution since runqueues are per cpu now ?

Is there a way to lock and browse each runqueues ?
or if not, is tasklist_lock can be use to lock all runqueues at once ?

and one another question, what is the difference between
local_irq_disable() and local_irq_save() ?
irq_save push eflags register on the stack, but why for ?

Thanks for any comments.
-- 
Tab

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2004-02-27 12:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-27 12:23 Vincent Hanquez [this message]
2004-02-27 13:08 ` about runqueues locking Zwane Mwaikambo

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=20040227122311.GA28181@snarc.org \
    --to=tab@snarc.org \
    --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.