mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Primiano Tucci <p.tucci@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org, rostedt <rostedt@goodmis.org>
Subject: Re: Considerations on sched APIs under RT patch
Date: Tue, 27 Apr 2010 15:18:53 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.00.1004271517440.2951@localhost.localdomain> (raw)
In-Reply-To: <k2nc5b2c05b1004201456j846b15a0oaa261d16740b5e33@mail.gmail.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1030 bytes --]

On Tue, 20 Apr 2010, Primiano Tucci wrote:

> Hi Peter,
> thank you for your reply.
> 
> On Tue, Apr 20, 2010 at 11:20 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> > On Mon, 2010-04-19 at 22:48 +0200, Primiano Tucci wrote:
> >
> >> Yesterday days I found a strange behavior of the scheduler API's using
> >> the RT patch, in particular the pthread_setaffinity_np (that stands on
> >> sched_setaffinity).
> >
> >> I think the main problem is that sched_setaffinity makes use of a
> >> rwlock, but rwlocks are pre-emptible with the RT patch.
> >
> > It does? where?
> >
> > sys_sched_setaffinity()
> >  sched_setaffinity()
> >    set_cpus_allowed_ptr()
> 
> 
> I see
> 
> long sched_setaffinity(pid_t pid, const struct cpumask *in_mask) {
> 	cpumask_var_t cpus_allowed, new_mask;
> 	struct task_struct *p;
> 	int retval;
> 
> 	get_online_cpus();
> -->	read_lock(&tasklist_lock);

You must be looking at some older version of -rt. The current
2.6.33-rt series does not take tasklist_lock in sched_setaffinity().

Thanks,

	tglx

      parent reply	other threads:[~2010-04-27 13:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-19 20:48 Primiano Tucci
2010-04-20  9:20 ` Peter Zijlstra
2010-04-20 21:56   ` Primiano Tucci
2010-04-20 23:00     ` Steven Rostedt
2010-04-21  5:16       ` Primiano Tucci
2010-04-21  8:49         ` Peter Zijlstra
2010-04-21 12:46           ` Steven Rostedt
2010-04-21 19:24             ` Primiano Tucci
2010-04-21 19:57               ` Peter Zijlstra
2010-04-21 20:38                 ` Primiano Tucci
2010-04-21 20:58                   ` Peter Zijlstra
2010-04-22 13:20                     ` Steven Rostedt
2010-04-22 13:50                       ` Primiano Tucci
2010-04-22 13:57                         ` Peter Zijlstra
2010-04-22 15:40                           ` Primiano Tucci
2010-04-22 16:28                             ` Peter Zijlstra
2010-04-22 17:48                               ` Bjoern Brandenburg
2010-04-22 19:33                               ` Primiano Tucci
2010-04-21 12:56     ` Peter Zijlstra
2010-04-27 13:18     ` Thomas Gleixner [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=alpine.LFD.2.00.1004271517440.2951@localhost.localdomain \
    --to=tglx@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.tucci@gmail.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.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®