From: "Christopher Friesen" <cfriesen@nortelnetworks.com>
To: Brian Gerst <bgerst@didntduck.org>
Cc: Cyrille Beraud <cyrille.beraud@savoirfairelinux.com>,
linux-kernel@vger.kernel.org
Subject: Re: Removing an executable while it runs
Date: Wed, 05 Dec 2001 15:00:13 -0500 [thread overview]
Message-ID: <3C0E7CCD.F9553BBD@nortelnetworks.com> (raw)
In-Reply-To: <3C0E4487.6000704@savoirfairelinux.com> <3C0E4803.3BBF045B@didntduck.org>
Brian Gerst wrote:
>
> Cyrille Beraud wrote:
> >
> > Hello,
> > I would like to remove an executable from the file-system while it is
> > running and
> > get all the blocks back immediately, not after the end of the program.
> > Is this possible ?
> > From what I understand, the inode is not released until the program
> > ends. Do all the
> > file-systems behave the same way ?
> >
> > Thank you for your help.
>
> It is not possible to reclaim the disk space until the program exits.
> This is because of demand paging of executables. The file must be kept
> around to handle possible future page faults, otherwise the program
> would crash if it called code that hadn't been loaded yet or was
> discarded due to memory pressure. This is true of all filesystems.
Couldn't you use mlockall() to ensure that demand paging is not a factor? Then
you should be able to free up the disk space since the actual application is
guaranteed to be in ram.
Chris
--
Chris Friesen | MailStop: 043/33/F10
Nortel Networks | work: (613) 765-0557
3500 Carling Avenue | fax: (613) 765-2986
Nepean, ON K2H 8E9 Canada | email: cfriesen@nortelnetworks.com
next prev parent reply other threads:[~2001-12-05 19:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-05 16:00 Removing an executable while it runs Cyrille Beraud
2001-12-05 16:14 ` Brian Gerst
2001-12-05 20:00 ` Christopher Friesen [this message]
2001-12-05 20:54 ` Tim Walberg
2001-12-06 0:25 ` Jeff Dike
2001-12-06 15:43 ` Eric-Olivier Lamey
-- strict thread matches above, loose matches on Subject: below --
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=3C0E7CCD.F9553BBD@nortelnetworks.com \
--to=cfriesen@nortelnetworks.com \
--cc=bgerst@didntduck.org \
--cc=cyrille.beraud@savoirfairelinux.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 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.