linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Stone Wang" <pwstone@gmail.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH][0/8] (Targeting 2.6.17) Posix memory locking and balanced mlock-LRU semantic
Date: Fri, 24 Mar 2006 10:05:09 -0500	[thread overview]
Message-ID: <bc56f2f0603240705y3b4abe3ej@mail.gmail.com> (raw)
In-Reply-To: <441FEF8D.7090905@yahoo.com.au>

2006/3/21, Nick Piggin <nickpiggin@yahoo.com.au>:
> Stone Wang wrote:
> > Both one of my friends(who is working on a DBMS oriented from
> > PostgreSQL) and i had encountered unexpected OOMs with mlock/mlockall.
> >
>
> I'm not sure this is a great idea. There are more conditions than just
> mlock that prevent pages being reclaimed. Running out of swap, for
> example, no swap, page temporarily pinned (in other words -- any duration
> from fleeting to permanent). I think something _much_ simpler could be
> done for a more general approach just to teach the VM to tolerate these
> pages a bit better.
>
> Also, supposing we do want this, I think there is a fairly significant
> queue of mm stuff you need to line up behind... it is probably asking
> too much to target 2.6.17 for such a significant change in any case.
>
> But despite all that I looked though and have a few comments ;)
> Kudos for jumping in and getting your hands dirty! It can be tricky code.
>
> > The patch brings Linux with:
> > 1. Posix mlock/munlock/mlockall/munlockall.
> >    Get mlock/munlock/mlockall/munlockall to Posix definiton: transaction-like,
> >    just as described in the manpage(2) of mlock/munlock/mlockall/munlockall.
> >    Thus users of mlock system call series will always have an clear map of
> >    mlocked areas.
>
> In what way are we not now posix compliant now?

Currently, Linux's mlock for example, may fail with  only part of its
task finished.

While accroding to POSIX definition:

man mlock(2)

"
RETURN VALUE
       On success, mlock returns zero.  On error, -1 is returned, errno is set
       appropriately, and no changes are made to  any  locks  in  the  address
       space of the process.
"

Shaoping Wang

>
> --
> SUSE Labs, Novell Inc.
>
>
> Send instant messages to your online friends http://au.messenger.yahoo.com
>
>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2006-03-24 15:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-20 13:35 Stone Wang
2006-03-20 13:41 ` Arjan van de Ven
2006-03-20 23:52   ` Nate Diller
2006-03-21  7:10     ` Arjan van de Ven
2006-03-21 12:24     ` Nick Piggin
2006-03-20 17:27 ` Christoph Lameter
2006-03-21  5:23   ` Stone Wang
2006-03-21 15:20   ` Stone Wang
2006-03-24  4:45   ` Rik van Riel
2006-03-21 12:20 ` Nick Piggin
2006-03-24 15:05   ` Stone Wang [this message]
2006-03-24 16:57     ` Nick Piggin
2006-03-24 14:36 ` Andi Kleen
2006-03-24 14:54   ` Stone Wang

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=bc56f2f0603240705y3b4abe3ej@mail.gmail.com \
    --to=pwstone@gmail.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nickpiggin@yahoo.com.au \
    /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