All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg@snapgear.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: "Jared Hulbert" <jaredeh@gmail.com>,
	Linux-kernel@vger.kernel.org, linux-embedded@vger.kernel.org,
	linux-mtd <linux-mtd@lists.infradead.org>,
	"Jörn Engel" <joern@logfs.org>,
	tim.bird@am.sony.com, cotte@de.ibm.com, nickpiggin@yahoo.com.au
Subject: Re: [PATCH 00/10] AXFS: Advanced XIP filesystem
Date: Tue, 26 Aug 2008 00:02:25 +1000	[thread overview]
Message-ID: <48B2BB71.3090803@snapgear.com> (raw)
In-Reply-To: <20080825114346.GB20960@shareable.org>


Hi Jamie,

Jamie Lokier wrote:
> Greg Ungerer wrote:
>> Sort of. It actually just uses a single ->read to bring in
>> the entire file contents. There is a few limitations on the use
>> of mmap() for non-mmu. Documentation/nommu-mmap.txt gives
>> more details. With no MMU it does rely on being able to kmalloc()
>> a single RAM region big enough to hold the entire file.
> 
> That's unfortunate, if you're using FDPIC-ELF or BFLT-XIP, you really want
> to kmalloc() one region for code (i.e. mmap not the whole file), and
> one separate for data.

That is what the BFLT loader does. For the XIP case it mmap()s
the text directly from the file, and then mmap()s a second region
for the data/bss (reading the data into that region).

I was referring to general mmap() of a file case above, not
the exec path.


>  Asking for a single larger region sometimes
> creates much higher memory pressure while kmalloc() attempts to
> defragment by evicting everything.

Sure.


> But that's fiddly to do right in general.
> 
> The natural thing for AXFS to do to support no-MMU FDPIC-ELF or
> BFLT-XIP is store the code segment uncompressed and contiguous, and
> the data segment however the filesystem prefers, and the profiling
> information to work out where these are is readily available from the
> mmap() calls, which are always the same when an executable is run.

Yep.

Regards
Greg


------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg@snapgear.com
SnapGear -- a Secure Computing Company      PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com

WARNING: multiple messages have this Message-ID (diff)
From: Greg Ungerer <gerg@snapgear.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: cotte@de.ibm.com, linux-embedded@vger.kernel.org,
	nickpiggin@yahoo.com.au, "Jörn Engel" <joern@logfs.org>,
	Linux-kernel@vger.kernel.org,
	linux-mtd <linux-mtd@lists.infradead.org>,
	tim.bird@am.sony.com
Subject: Re: [PATCH 00/10] AXFS: Advanced XIP filesystem
Date: Tue, 26 Aug 2008 00:02:25 +1000	[thread overview]
Message-ID: <48B2BB71.3090803@snapgear.com> (raw)
In-Reply-To: <20080825114346.GB20960@shareable.org>


Hi Jamie,

Jamie Lokier wrote:
> Greg Ungerer wrote:
>> Sort of. It actually just uses a single ->read to bring in
>> the entire file contents. There is a few limitations on the use
>> of mmap() for non-mmu. Documentation/nommu-mmap.txt gives
>> more details. With no MMU it does rely on being able to kmalloc()
>> a single RAM region big enough to hold the entire file.
> 
> That's unfortunate, if you're using FDPIC-ELF or BFLT-XIP, you really want
> to kmalloc() one region for code (i.e. mmap not the whole file), and
> one separate for data.

That is what the BFLT loader does. For the XIP case it mmap()s
the text directly from the file, and then mmap()s a second region
for the data/bss (reading the data into that region).

I was referring to general mmap() of a file case above, not
the exec path.


>  Asking for a single larger region sometimes
> creates much higher memory pressure while kmalloc() attempts to
> defragment by evicting everything.

Sure.


> But that's fiddly to do right in general.
> 
> The natural thing for AXFS to do to support no-MMU FDPIC-ELF or
> BFLT-XIP is store the code segment uncompressed and contiguous, and
> the data segment however the filesystem prefers, and the profiling
> information to work out where these are is readily available from the
> mmap() calls, which are always the same when an executable is run.

Yep.

Regards
Greg


------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg@snapgear.com
SnapGear -- a Secure Computing Company      PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com

  reply	other threads:[~2008-08-25 14:02 UTC|newest]

Thread overview: 107+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-21  5:44 [PATCH 00/10] AXFS: Advanced XIP filesystem Jared Hulbert
2008-08-21  5:44 ` Jared Hulbert
2008-08-21  6:32 ` Frans Meulenbroeks
2008-08-21  6:32   ` Frans Meulenbroeks
2008-08-21 19:32   ` Jared Hulbert
2008-08-21 19:32     ` Jared Hulbert
2008-08-22  2:04     ` Nick Piggin
2008-08-22  2:04       ` Nick Piggin
2008-08-21  8:39 ` Dave Chinner
2008-08-21  8:39   ` Dave Chinner
2008-08-21 14:19   ` Jared Hulbert
2008-08-21 14:19     ` Jared Hulbert
2008-08-21 14:31     ` Leon Woestenberg
2008-08-21 14:31       ` Leon Woestenberg
2008-08-21 14:42       ` Jared Hulbert
2008-08-21 14:42         ` Jared Hulbert
2008-08-21 14:49       ` Geert Uytterhoeven
2008-08-21 14:49         ` Geert Uytterhoeven
2008-08-21 10:25 ` Carsten Otte
2008-08-21 10:25   ` Carsten Otte
2008-08-21 10:43   ` Nick Piggin
2008-08-21 10:43     ` Nick Piggin
2008-08-21 12:53     ` Arnd Bergmann
2008-08-21 12:53       ` Arnd Bergmann
2008-08-21 14:12       ` Jared Hulbert
2008-08-21 14:12         ` Jared Hulbert
2008-08-21 14:14         ` Arnd Bergmann
2008-08-21 14:14           ` Arnd Bergmann
2008-08-21 14:13     ` Jared Hulbert
2008-08-21 14:13       ` Jared Hulbert
2008-08-22  2:32       ` Nick Piggin
2008-08-22  2:32         ` Nick Piggin
2008-08-21 14:30   ` Jared Hulbert
2008-08-21 14:30     ` Jared Hulbert
2008-08-21 11:07 ` Jamie Lokier
2008-08-21 11:07   ` Jamie Lokier
2008-08-21 14:11   ` Jared Hulbert
2008-08-21 14:11     ` Jared Hulbert
2008-08-22  0:12     ` Greg Ungerer
2008-08-22  0:12       ` Greg Ungerer
2008-08-22  2:48       ` Jared Hulbert
2008-08-22  2:48         ` Jared Hulbert
2008-08-25  6:35         ` Greg Ungerer
2008-08-25  6:35           ` Greg Ungerer
2008-08-25 11:43           ` Jamie Lokier
2008-08-25 11:43             ` Jamie Lokier
2008-08-25 14:02             ` Greg Ungerer [this message]
2008-08-25 14:02               ` Greg Ungerer
2008-08-22 18:13       ` Jamie Lokier
2008-08-22 18:13         ` Jamie Lokier
2008-08-22 18:16         ` Jared Hulbert
2008-08-22 18:16           ` Jared Hulbert
2008-08-22 18:37           ` Jamie Lokier
2008-08-22 18:37             ` Jamie Lokier
2008-08-22 18:43             ` Jamie Lokier
2008-08-22 18:43               ` Jamie Lokier
2008-09-12 21:52               ` Jared Hulbert
2008-09-12 21:52                 ` Jared Hulbert
2008-09-15 16:34                 ` Jamie Lokier
2008-09-15 16:34                   ` Jamie Lokier
2008-09-15 19:43                   ` Jared Hulbert
2008-09-15 19:43                     ` Jared Hulbert
2008-09-19 19:20                     ` Trent Piepho
2008-09-19 19:20                       ` Trent Piepho
2008-09-16  6:57                   ` Ricard Wanderlof
2008-09-16  6:57                     ` Ricard Wanderlof
2008-09-16  6:57                     ` Ricard Wanderlof
2008-09-16 15:30                     ` Jared Hulbert
2008-09-16 15:30                       ` Jared Hulbert
2008-09-12 20:17             ` Jared Hulbert
2008-09-12 20:17               ` Jared Hulbert
2008-09-15 16:40               ` Jamie Lokier
2008-09-15 16:40                 ` Jamie Lokier
2008-08-21 23:46   ` Greg Ungerer
2008-08-21 23:46     ` Greg Ungerer
2008-08-22 18:10     ` Jamie Lokier
2008-08-22 18:10       ` Jamie Lokier
2008-08-22 14:54 ` Geert Uytterhoeven
2008-08-22 14:54   ` Geert Uytterhoeven
2008-08-22 15:19   ` Arnd Bergmann
2008-08-22 15:19     ` Arnd Bergmann
2008-08-22 16:51   ` Jared Hulbert
2008-08-22 16:51     ` Jared Hulbert
2008-08-25  9:37     ` Geert Uytterhoeven
2008-08-25  9:37       ` Geert Uytterhoeven
2008-08-25  9:37       ` Geert Uytterhoeven
2008-08-25 10:52       ` Carsten Otte
2008-08-25 10:52         ` Carsten Otte
2008-08-25 12:16     ` David Woodhouse
2008-08-25 12:16       ` David Woodhouse
2008-08-28 15:40     ` Geert Uytterhoeven
2008-08-28 15:40       ` Geert Uytterhoeven
2008-09-02 15:37       ` Geert Uytterhoeven
2008-09-02 15:37         ` Geert Uytterhoeven
2008-09-02 16:44         ` Jared Hulbert
2008-09-02 16:44           ` Jared Hulbert
2008-09-02 17:15           ` Jörn Engel
2008-09-02 17:15             ` Jörn Engel
2008-09-02 17:15             ` Jörn Engel
2008-09-02 17:47             ` Jared Hulbert
2008-09-02 17:47               ` Jared Hulbert
2008-09-02 18:33           ` Geert Uytterhoeven
2008-09-02 18:33             ` Geert Uytterhoeven
2008-08-22 22:09   ` Will Marone
2008-08-22 22:09     ` Will Marone
2008-08-25  7:23     ` Geert Uytterhoeven
2008-08-25  7:23       ` Geert Uytterhoeven

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=48B2BB71.3090803@snapgear.com \
    --to=gerg@snapgear.com \
    --cc=Linux-kernel@vger.kernel.org \
    --cc=cotte@de.ibm.com \
    --cc=jamie@shareable.org \
    --cc=jaredeh@gmail.com \
    --cc=joern@logfs.org \
    --cc=linux-embedded@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=tim.bird@am.sony.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 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.