mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric-Olivier Lamey <eric.olivier.lamey@savoirfairelinux.com>
To: linux-kernel@vger.kernel.org
Cc: "Cyrille Béraud" <cyrille.beraud@savoirfairelinux.com>,
	"Jeff Dike" <jdike@karaya.com>,
	"Tim Walberg" <twalberg@mindspring.com>,
	"Brian Gerst" <bgerst@didntduck.org>
Subject: Re: Removing an executable while it runs
Date: Thu, 6 Dec 2001 10:43:17 -0500	[thread overview]
Message-ID: <20011206154317.GB14780@192.168.1.1> (raw)
In-Reply-To: <20011205145442.A12034@mindspring.com> <200112060025.TAA04538@ccure.karaya.com>
In-Reply-To: <200112060025.TAA04538@ccure.karaya.com>

On Wed, Dec 05, 2001 at 07:25, Jeff Dike wrote:
> twalberg@mindspring.com said:
> > mlockall() only locks those pages that are **currently** paged in, or
> > optionally those that will be paged in in the future. Unless you have
> > a way to make sure that all pages of the binary are actually in memory
> > before you call mlockall(), this gains you nothing.
> 
> No, mlockall will page in the entire process before returning if you ask it to.
> 
> See this snippet in mlock_fixup:
> 
> 		if (newflags & VM_LOCKED) {
> 			pages = -pages;
> 			make_pages_present(start, end);
> 		}
> 
> VM_LOCKED comes in through the mlockall system call.
> 
> 				Jeff

  Well, according to the man page, mister Walberg is right. How can I
  force mlockall to page in the entire process ? And if it is possible,
  I guess it won't resolve my problem since it is the filesystem which
  refuses to release the blocks, right ?
  To be more precise, here is my situation: the executable file is
  located on a ramfs filesystem. Once it is started, I would like to get
  the space back so that the RAM can be used. Is there a clean solution ?

  P.S: on behalf of Cyrille (who made the first post), I would like to
  thank you for your answers, it is greatly appreciated.

  P.P.S: is it required to include the people involved in the thread in
  the Cc: field ? I have looked in the mailing list FAQ and have not
  found the reason.

-- 
Eric-Olivier Lamey

  reply	other threads:[~2001-12-06 15:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-05 16:00 Cyrille Beraud
2001-12-05 16:14 ` Brian Gerst
2001-12-05 20:00   ` Christopher Friesen
2001-12-05 20:54     ` Tim Walberg
2001-12-06  0:25       ` Jeff Dike
2001-12-06 15:43         ` Eric-Olivier Lamey [this message]
2001-12-05 17:15 Petr Vandrovec
2001-12-05 19:32 ` Mike Fedyk
2001-12-05 21:19 Petr Vandrovec

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=20011206154317.GB14780@192.168.1.1 \
    --to=eric.olivier.lamey@savoirfairelinux.com \
    --cc=bgerst@didntduck.org \
    --cc=cyrille.beraud@savoirfairelinux.com \
    --cc=jdike@karaya.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=twalberg@mindspring.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

all inboxes | Powered by JetHome®