mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: <mchu@mirapoint.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: Cheap lock for user mode processes release when process exits
Date: Thu, 12 Apr 2007 19:43:52 -0700	[thread overview]
Message-ID: <20070412194352.a29de6f5.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070413015428.AMJ80009@dougfood.mirapoint.com>

On Fri, 13 Apr 2007 01:54:28 +0000 (GMT) <mchu@mirapoint.com> wrote:

> Hi all,
> 
> Maybe someone here knows better.
> 
> I have several user-mode processes using shared mmap.  There can be several reader processes and only one writer.  Readers access the shared region frequently, writer seldom.
> 
> Naturally, multi-reader/single-writer locks works best.  I tried this with futex on 2.6.9-42.EL.  However, if one of the processes is killed/exits, the lock doesn't get released.
> 
> I can trap the signal to release the lock, but not all signals like kill.
> 
> Anyway I can achieve this without a potential deadlock?
> 

Robust futexes: http://lwn.net/Articles/172149/

But I don't know whether RH backported them into RHEL4.

      reply	other threads:[~2007-04-13  2:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-13  1:54 mchu
2007-04-13  2:43 ` Andrew Morton [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=20070412194352.a29de6f5.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchu@mirapoint.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

Powered by JetHome