public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Inaky Perez-Gonzalez <inaky@linux.intel.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Bill Huey <bhuey@lnxw.com>,
	dwalker@mvista.com, mingo@elte.hu, linux-kernel@vger.kernel.org,
	Esben Nielsen <simlo@phys.au.dk>
Subject: Re: FUSYN and RT
Date: Fri, 15 Apr 2005 18:53:56 -0700	[thread overview]
Message-ID: <16992.28724.665847.46695@sodium.jf.intel.com> (raw)
In-Reply-To: <1113615510.4294.113.camel@localhost.localdomain>

>>>>> Steven Rostedt <rostedt@goodmis.org> writes:

> On Fri, 2005-04-15 at 18:20 -0700, Inaky Perez-Gonzalez wrote:

>> Back to my example before: in fusyn, a user space lock is a kernel
>> space lock with a wrapper, that provides all that is necessary for
>> doing the fast path and handling user-space specific issues.

> ...

> So, to answer your question. Looking forward, I kind of see two
> different structures for locking.  The rt_mutex and something that
> is used by fusyn, then there being some common structure (or ops)
> that they both use to implement the PI.  But the implementation of
> how the locks work may as well be different. But this may not be the
> case, and there still be two structures but the fusyn just contain a
> rt_mutex lock to do the actual locking and the rest of the structure
> be used for showing information or what not back up to user
> space. This stuff wouldn't be necessary for the rt_mutex. We need to
> keep rt_mutex small since it is used all over the place.

I see--would the following fit your view?

This would be a kernel lock [from the fusyn patch, linux/fulock.h]:

	/** A fulock, mutex usable from the kernel. */
	struct fulock {
	        struct fuqueue fuqueue;
	        struct task_struct *owner;
	        unsigned flags;
	        struct plist olist_node;
	};

This has an in kernel API so you can use it from modules or kernel
code.

And this would be kernel representation of a user space lock [from
linux/fulock_kernel.h]:

	struct ufulock {
	        struct fulock fulock;
	        struct vlocator vlocator;
	        struct page *page;
	};

This is exposed via system calls with fast-path as an option.

This is basically the kernel lock that provides the functionality and
an structure to keep a tab to where the thing is in user space (hash
queues a la futex). The ops are hidden in fulock.fuqueue.ops [fuqueue
is the waitqueue--just for reference, from linux/fuqueue.h].

	/** A fuqueue, a prioritized wait queue usable from kernel space. */
	struct fuqueue {
	        spinlock_t lock;        
	        struct plist wlist;
	        struct fuqueue_ops *ops;
	};

-- 

Inaky


  reply	other threads:[~2005-04-16  1:56 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-12 20:35 FUSYN and RT Perez-Gonzalez, Inaky
2005-04-12 23:11 ` Esben Nielsen
2005-04-13  0:27   ` Daniel Walker
2005-04-13 15:46     ` Steven Rostedt
2005-04-13 17:33       ` Daniel Walker
2005-04-13 18:38         ` Steven Rostedt
2005-04-15 22:51       ` Bill Huey
2005-04-15 23:37         ` Inaky Perez-Gonzalez
2005-04-16  1:14           ` Steven Rostedt
2005-04-16  1:20             ` Inaky Perez-Gonzalez
2005-04-16  1:38               ` Steven Rostedt
2005-04-16  1:53                 ` Inaky Perez-Gonzalez [this message]
2005-04-16  2:31                   ` Steven Rostedt
2005-04-16  3:00                     ` Sven Dietrich
2005-04-16  3:31                       ` Steven Rostedt
2005-04-16 13:05                       ` john cooper
2005-04-16 14:23                         ` Steven Rostedt
2005-04-16 14:51                           ` john cooper
2005-04-16  4:05                     ` Inaky Perez-Gonzalez
2005-04-18  5:30           ` Bill Huey
2005-04-18  7:37             ` Sven-Thorsten Dietrich
2005-04-18 11:33               ` Steven Rostedt
  -- strict thread matches above, loose matches on Subject: below --
2005-04-12 23:36 Perez-Gonzalez, Inaky
2005-04-12 23:09 Perez-Gonzalez, Inaky
2005-04-12 22:26 Perez-Gonzalez, Inaky
2005-04-12 22:33 ` Daniel Walker
2005-04-12 21:28 Perez-Gonzalez, Inaky
2005-04-12 19:35 Perez-Gonzalez, Inaky
2005-04-12 18:15 Daniel Walker
2005-04-12 20:29 ` Esben Nielsen
2005-04-12 22:15   ` Daniel Walker
2005-04-12 20:33 ` Joe Korty
2005-04-12 21:25   ` 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=16992.28724.665847.46695@sodium.jf.intel.com \
    --to=inaky@linux.intel.com \
    --cc=bhuey@lnxw.com \
    --cc=dwalker@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=simlo@phys.au.dk \
    /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