From: Andi Kleen <andi@firstfloor.org>
To: Ulrich Drepper <drepper@gmail.com>
Cc: Andi Kleen <andi@firstfloor.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH prototype] [0/8] Predictive bitmaps for ELF executables
Date: Fri, 21 Mar 2008 18:26:44 +0100 [thread overview]
Message-ID: <20080321172644.GG2346@one.firstfloor.org> (raw)
In-Reply-To: <a36005b50803211015l64005f6emb80dbfc21dcfad9f@mail.gmail.com>
On Fri, Mar 21, 2008 at 10:15:15AM -0700, Ulrich Drepper wrote:
> On Thu, Mar 20, 2008 at 2:00 AM, Andi Kleen <andi@firstfloor.org> wrote:
> > What chaos exactly? For me it looks rather that a separatate database
> > would be a recipe for chaos. e.g. for example how would you make sure
> > the database keeps track of changing executables?
>
> I didn't say that a separate file with the data is better. In fact, I
> agree, it's not much better. What I referred to as the problem is
> that this is an extension which is not part of the ELF spec and
Linux executables already contain plenty of extensions outside
the ELF spec like GNU_EH_FRAME or debuglink etc. It is not surprising
because the ELF spec is kind of not maintained anymore afaik.
> doesn't fit in. The ELF spec has rules how programs have to deal with
> unknown parts of a binary. Only this way programs like strip can work
Can you expand how the bitmap headers or pbitmap.c violate these rules?
> in the presence of extensions. There are ways to embed such a bitmap
> but not ad-hoc as you proposed.
Concrete suggestions please.
>
>
> > But if the binutils leanred about this and added a bitmap phdr (it
> > tends to be only a few hundred bytes even on very large executables)
> > one seek could be avoided.
>
> And that is only one advantage. Let's not go done the path of invalid
> ELF files.
What is invalid?
>
>
> > > Furthermore, by adding all this data to the end of the file you'll
> >
> > We are talking about 32bytes for each MB worth of executable.
> > You can hardly call that "all that data".
>
> This wasn't a comment about the size of the data but the type of data.
> The end of a binary contains data which is not used at runtime. Now
> you're mixing in data which is used.
Well there was no other choice I know of short of relinking. Or do you
have a way to add a PHDR without relinking? I am aware the SHDR is a hack,
I called it that myself. I just don't know of a better way.
If the pbitmaps were universally adopted the use of the SHDRs would
be phased out quickly I expect because the bitmaps would be standard
parts of all PHDRs, but short term not requiring relinking
is a huge advantage.
> Again, you misunderstand. I'm not proposing to exclude pages which
> are only used at startup time. I mean the data collection should stop
> some time after a process was started to account for possibly quite
> different code paths which are taken by different runs of the program.
> I.e., don't record page faults for the entire runtime of the program
> which, hopefully in most cases, will result in all the pages of a
> program to be marked (unless you have a lot of dead code in the binary
> and it's all located together).
When would that time be? I cannot think of a single heuristic that would
work for both "/bin/true" and a OpenOffice start.
-Andi
--
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>
next prev parent reply other threads:[~2008-03-21 17:26 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-18 1:09 Andi Kleen
2008-03-18 1:09 ` [PATCH prototype] [1/8] Give ELF shdr types a name Andi Kleen
2008-03-18 1:09 ` [PATCH prototype] [2/8] Add support to override mmap exec write protection with O_FORCEWRITE Andi Kleen
2008-03-18 1:09 ` [PATCH prototype] [3/8] Make readahead max pinned value a sysctl Andi Kleen
2008-03-18 1:09 ` [PATCH prototype] [4/8] Add readahead function to read-ahead based on a bitmap Andi Kleen
2008-03-18 1:09 ` [PATCH prototype] [5/8] Add ELF constants for pbitmaps Andi Kleen
2008-03-18 1:09 ` [PATCH prototype] [6/8] Core predictive bitmap engine Andi Kleen
2008-03-18 1:09 ` [PATCH prototype] [7/8] Add the sysctls to control pbitmaps Andi Kleen
2008-03-18 1:09 ` [PATCH prototype] [8/8] Add mmap_full_slurp support Andi Kleen
2008-03-18 7:36 ` [PATCH prototype] [0/8] Predictive bitmaps for ELF executables Andrew Morton
2008-03-18 14:18 ` Andi Kleen
2008-03-18 16:57 ` Andrew Morton
2008-03-18 17:20 ` Andi Kleen
2008-03-18 17:44 ` Andrew Morton
2008-03-19 8:32 ` Andi Kleen
2008-03-19 9:04 ` Andrew Morton
2008-03-19 22:45 ` Ulrich Drepper
2008-03-19 23:12 ` Andrew Morton
2008-03-20 0:09 ` David Miller, Andrew Morton
2008-03-20 9:00 ` Andi Kleen
2008-03-21 17:15 ` Ulrich Drepper
2008-03-21 17:26 ` Andi Kleen [this message]
2008-03-22 4:36 ` Ulrich Drepper
2008-03-22 7:17 ` Andi Kleen
2008-03-22 7:24 ` Nicholas Miell
2008-03-22 9:10 ` Andi Kleen
2008-03-22 10:16 ` Nicholas Miell
2008-03-22 14:29 ` Andi Kleen
2008-03-23 13:25 ` Pavel Machek
2008-03-23 17:08 ` Andi Kleen
2008-03-24 16:24 ` Pavel Machek
2008-03-24 4:20 ` Ulrich Drepper
2008-03-24 5:16 ` Nicholas Miell
2008-03-24 5:26 ` Andi Kleen
2008-03-24 19:42 ` Ulrich Drepper
2008-03-24 21:47 ` Nicholas Miell
2008-03-25 7:54 ` Andi Kleen
2008-03-26 18:15 ` Ulrich Drepper
2008-03-26 18:54 ` Andi Kleen
2008-03-22 4:38 ` Ulrich Drepper
2008-03-20 0:15 ` Diego Calleja
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=20080321172644.GG2346@one.firstfloor.org \
--to=andi@firstfloor.org \
--cc=akpm@linux-foundation.org \
--cc=drepper@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox