public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@us.ibm.com>
To: Daniel Walker <dwalker@mvista.com>
Cc: linux-kernel@vger.kernel.org, mingo@mvista.com,
	sdietrich@mvista.com, inaky.perez-gonzalez@intel.com
Subject: Re: [PATCH] Priority Lists for the RT mutex
Date: Tue, 12 Apr 2005 11:37:28 -0700	[thread overview]
Message-ID: <20050412183728.GA1369@us.ibm.com> (raw)
In-Reply-To: <1112896344.16901.26.camel@dhcp153.mvista.com>

On Thu, Apr 07, 2005 at 10:52:25AM -0700, Daniel Walker wrote:
> 
> Source: Daniel Walker <dwalker@mvista.com> MontaVista Software, Inc
> Description:
> 	This patch adds the priority list data structure from Inaky Perez-Gonzalez 
> to the Preempt Real-Time mutex.
> 
> the patch order is (starting with a 2.6.11 kernel tree),
> 
> patch-2.6.12-rc2
> realtime-preempt-2.6.12-rc2-V0.7.44-01
> 	
> Signed-off-by: Daniel Walker <dwalker@mvista.com>
> 
> Index: linux-2.6.11/include/linux/plist.h
> ===================================================================
> --- linux-2.6.11.orig/include/linux/plist.h	1970-01-01 00:00:00.000000000 +0000
> +++ linux-2.6.11/include/linux/plist.h	2005-04-07 17:47:42.000000000 +0000
> @@ -0,0 +1,310 @@

[ . . . ]

> +/* Grunt to do the real removal work of @pl from the plist. */
> +static inline
> +void __plist_del (struct plist *pl)
> +{
> +	struct list_head *victim;
> +	if (list_empty (&pl->dp_node))  	/* SP-node, not head */
> +		victim = &pl->sp_node;
> +	else if (list_empty (&pl->sp_node)) 	/* DP-node, empty SP list */
> +		victim = &pl->dp_node;
> +	else {					/* SP list head, not empty */
> +		struct plist *pl_new = container_of (pl->sp_node.next,
> +						     struct plist, sp_node);
> +		victim = &pl->sp_node;
> +		list_replace_rcu (&pl->dp_node, &pl_new->dp_node);

If you are protecting this list with RCU...

> +	}
> +	list_del_init (victim);

... you need to wait for a grace period before deleting the element
removed from the list.

Or are you just using list_replace_rcu() for its replacement capability?
If so, seems like it might be worthwhile to make a list_replace().
This would get rid of the memory barrier, and also keep from confusing
people like myself.  ;-)

							Thanx, Paul

  parent reply	other threads:[~2005-04-12 20:32 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-07 17:52 [PATCH] Priority Lists for the RT mutex Daniel Walker
2005-04-08  6:28 ` Ingo Molnar
2005-04-08  8:05   ` Sven-Thorsten Dietrich
2005-04-10 11:09     ` Ingo Molnar
2005-04-12 17:56       ` Daniel Walker
2005-04-08 17:11   ` Daniel Walker
2005-04-10 10:53 ` Ingo Molnar
2005-04-11 16:19   ` Daniel Walker
2005-04-12 18:37 ` Paul E. McKenney [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-04-08 21:25 Perez-Gonzalez, Inaky
2005-04-08 22:53 ` Daniel Walker
2005-04-08 23:05 Perez-Gonzalez, Inaky
2005-04-11  8:27 Perez-Gonzalez, Inaky
2005-04-11  8:42 ` Ingo Molnar
2005-04-11  8:49 Perez-Gonzalez, Inaky
2005-04-11  8:57 ` Ingo Molnar
2005-04-11 22:17   ` Bill Huey
2005-04-12 20:35   ` Esben Nielsen
2005-04-11  9:03 Perez-Gonzalez, Inaky
2005-04-11 22:31 Perez-Gonzalez, Inaky
2005-04-11 23:11 ` Bill Huey
2005-04-11 23:28 Perez-Gonzalez, Inaky
2005-04-12  0:27 ` Bill Huey
2005-04-12  0:36 Perez-Gonzalez, Inaky
2005-05-06  9:05 Oleg Nesterov
2005-05-06 11:13 ` Oleg Nesterov
2005-05-06 18:56   ` Daniel Walker
2005-05-06 18:13 Perez-Gonzalez, Inaky
2005-05-07  7:25 ` Oleg Nesterov
2005-05-09  7:30   ` Ingo Molnar
2005-05-09  8:08     ` Oleg Nesterov
2005-05-09  9:11       ` Ingo Molnar
2005-05-09 14:32         ` Oleg Nesterov
2005-05-09 18:13         ` Daniel Walker
2005-05-09 19:21           ` Steven Rostedt
2005-05-09 21:29             ` Daniel Walker
2005-05-09 22:15               ` Daniel Walker
2005-05-09 14:07   ` Daniel Walker

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=20050412183728.GA1369@us.ibm.com \
    --to=paulmck@us.ibm.com \
    --cc=dwalker@mvista.com \
    --cc=inaky.perez-gonzalez@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@mvista.com \
    --cc=sdietrich@mvista.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