public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: david singleton <dsingleton@mvista.com>
Cc: "David F. Carlson" <dave@chronolytics.com>,
	Dinakar Guniguntala <dino@in.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: PI BUG with -rt13
Date: Fri, 25 Nov 2005 09:03:58 +0100	[thread overview]
Message-ID: <20051125080358.GA25925@elte.hu> (raw)
In-Reply-To: <EDDB1894-5AFB-11DA-A840-000A959BB91E@mvista.com>


* david singleton <dsingleton@mvista.com> wrote:

> > why is there per-vma info needed?
> 
> I've had numerous requests to add support for pthread_mutexes that 
> have been 'malloc'd and end up in the heap.
> 
> The original robust futex patch only supported shared pthread mutexes, 
> backed either by a file in which the pthread mutex was written on in 
> anonymous memory allocated via mmap with the MAP_SHARE and 
> MAP_ANONYMOUS flags.
> 
> Anonymous memory gets backed by an inode on which we lookup and hang 
> the robust mutex structure (and which gets freed on the last reference 
> to the inode.)
> 
> The choice seemed either to back heap with the anonymous memory/inode 
> framework or just hang the struct on the vma itself.

putting it into the vma is just about the worst solution. vma size is 
something we are very sensitive to. Your patch adds:

+       int robust_init;                /* robust initialized? */
+       struct list_head robust_list;   /* list of robust futexes in this vma */
+       struct semaphore robust_sem;    /* semaphore to protect the list */

which is unacceptable. _And_ you were also talking about making it an 
rbtree... why do you want to make it a tree?

also, funky runtime flags like 'robust_init' are just sloppy.

add a separate pointer, and put the above fields into a separate SLAB.  
That way the overhead to the vma is a single pointer. (which might still 
be unacceptable to upstream!)

	Ingo

  parent reply	other threads:[~2005-11-25  8:03 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-17 16:18 PI BUG with -rt13 Dinakar Guniguntala
2005-11-17 16:41 ` Dinakar Guniguntala
2005-11-17 23:03 ` David Singleton
2005-11-18  9:29   ` Ingo Molnar
2005-11-18 13:21     ` Dinakar Guniguntala
2005-11-18 13:27       ` Ingo Molnar
2005-11-18 17:05         ` david singleton
2005-11-18 17:44           ` Ingo Molnar
2005-11-21 19:48             ` David Singleton
2005-11-21 21:26               ` Ingo Molnar
2005-11-22  2:01                 ` david singleton
2005-11-24 14:57                   ` Ingo Molnar
2005-11-24 20:26                     ` Dinakar Guniguntala
2005-11-24 20:32                       ` Dinakar Guniguntala
2005-11-24 22:25                         ` david singleton
2005-11-25  4:56                         ` david singleton
2005-11-25  7:34                           ` Dinakar Guniguntala
2005-11-25  8:04                             ` Dinakar Guniguntala
2005-11-25  5:04                       ` Ingo Molnar
2005-11-25 13:27                         ` Dinakar Guniguntala
2005-11-25  8:03                   ` Ingo Molnar [this message]
2005-11-22  2:13                 ` david singleton
     [not found]                 ` <8D664A17-5B07-11DA-A840-000A959BB91E@mvista.com>
2005-11-22  9:37                   ` Dinakar Guniguntala

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=20051125080358.GA25925@elte.hu \
    --to=mingo@elte.hu \
    --cc=dave@chronolytics.com \
    --cc=dino@in.ibm.com \
    --cc=dsingleton@mvista.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox