All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@sun.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Jon Masters <jonathan@jonmasters.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Marcelo Tosatti <marcelo@kvack.org>,
	Daniel Spang <daniel.spang@gmail.com>,
	Rik van Riel <riel@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	Pavel Machek <pavel@ucw.cz>, Al Boldi <a1426z@gawab.com>,
	Zan Lynx <zlynx@acm.org>
Subject: Re: [sample] mem_notify v6: usage example
Date: Mon, 11 Feb 2008 11:15:26 -0700	[thread overview]
Message-ID: <20080211181526.GC3029@webber.adilger.int> (raw)
In-Reply-To: <2f11576a0802090846t7655e988pb1b712696cad1098@mail.gmail.com>

On Feb 10, 2008  01:46 +0900, KOSAKI Motohiro wrote:
> > This really needs to be triggered via a generic kernel event in the
> > final version - I picture glibc having a reservation API and having
> > generic support for freeing such reservations.
> 
> to be honest, I doubt idea of generic reservation framework.
> 
> end up, we hope drop the application cache, not also dataless memory.
> but, automatically drop mechanism only able to drop dataless memory.
> 
> and, many application have own memory management subsystem.
> I afraid to nobody use too complex framework.

Having such notification handled by glibc to free up unused malloc (or
any heap allocations) would be very useful, because even if a program
does "free" there is no guarantee the memory is returned to the kernel.

I think that having a generic reservation framework is too complex, but
hiding the details of /dev/mem_notify from applications is desirable.
A simple wrapper (possibly part of glibc) to return the poll fd, or set
up the signal is enough.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.


WARNING: multiple messages have this Message-ID (diff)
From: Andreas Dilger <adilger@sun.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Jon Masters <jonathan@jonmasters.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Marcelo Tosatti <marcelo@kvack.org>,
	Daniel Spang <daniel.spang@gmail.com>,
	Rik van Riel <riel@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	Pavel Machek <pavel@ucw.cz>, Al Boldi <a1426z@gawab.com>,
	Zan Lynx <zlynx@acm.org>
Subject: Re: [sample] mem_notify v6: usage example
Date: Mon, 11 Feb 2008 11:15:26 -0700	[thread overview]
Message-ID: <20080211181526.GC3029@webber.adilger.int> (raw)
In-Reply-To: <2f11576a0802090846t7655e988pb1b712696cad1098@mail.gmail.com>

On Feb 10, 2008  01:46 +0900, KOSAKI Motohiro wrote:
> > This really needs to be triggered via a generic kernel event in the
> > final version - I picture glibc having a reservation API and having
> > generic support for freeing such reservations.
> 
> to be honest, I doubt idea of generic reservation framework.
> 
> end up, we hope drop the application cache, not also dataless memory.
> but, automatically drop mechanism only able to drop dataless memory.
> 
> and, many application have own memory management subsystem.
> I afraid to nobody use too complex framework.

Having such notification handled by glibc to free up unused malloc (or
any heap allocations) would be very useful, because even if a program
does "free" there is no guarantee the memory is returned to the kernel.

I think that having a generic reservation framework is too complex, but
hiding the details of /dev/mem_notify from applications is desirable.
A simple wrapper (possibly part of glibc) to return the poll fd, or set
up the signal is enough.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

--
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:[~2008-02-11 18:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-09 15:55 [sample] mem_notify v6: usage example KOSAKI Motohiro
2008-02-09 15:55 ` KOSAKI Motohiro
2008-02-09 16:07 ` Jon Masters
2008-02-09 16:07   ` Jon Masters
2008-02-09 16:46   ` KOSAKI Motohiro
2008-02-09 16:46     ` KOSAKI Motohiro
2008-02-11 18:15     ` Andreas Dilger [this message]
2008-02-11 18:15       ` Andreas Dilger
2008-02-11 18:37       ` KOSAKI Motohiro
2008-02-11 18:37         ` KOSAKI Motohiro
2008-02-10  1:30   ` Pavel Machek
2008-02-10  1:30     ` Pavel Machek

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=20080211181526.GC3029@webber.adilger.int \
    --to=adilger@sun.com \
    --cc=a1426z@gawab.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=daniel.spang@gmail.com \
    --cc=jonathan@jonmasters.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=marcelo@kvack.org \
    --cc=pavel@ucw.cz \
    --cc=riel@redhat.com \
    --cc=zlynx@acm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.