All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Dharm <mdharm-kernel@one-eyed-alien.net>
To: Jeremy Puhlman <jpuhlman@mvista.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Endianness-aware mkcramfs
Date: Tue, 4 Dec 2001 17:38:19 -0800	[thread overview]
Message-ID: <20011204173819.C29968@one-eyed-alien.net> (raw)
In-Reply-To: <3C0BD8FD.F9F94BE0@mvista.com> <3C0CB59B.EEA251AB@lightning.ch> <9uj5fb$1fm$1@cesium.transmeta.com> <20011205013630.C717@nightmaster.csn.tu-chemnitz.de> <3C0D6CB6.7000905@zytor.com> <20011204164941.A29968@one-eyed-alien.net> <20011204170235.M25671@mvista.com>
In-Reply-To: <20011204170235.M25671@mvista.com>; from jpuhlman@mvista.com on Tue, Dec 04, 2001 at 05:02:35PM -0800

[-- Attachment #1: Type: text/plain, Size: 1779 bytes --]

On Tue, Dec 04, 2001 at 05:02:35PM -0800, Jeremy Puhlman wrote:
> On Tue, Dec 04, 2001 at 04:49:41PM -0800, Matthew Dharm wrote:
> > There is another argument for supporting both endiannesses....
> > 
> > Consider an embedded system which can be run in either endianness.  Sounds
> > silly?  MIPS processors can run big or little endian, and many people
> > routinely switch between them.
> Yes but typically this also includes a step of reflashing firmware or
> swaping of firmware...So it would not be unrealistic to swap out the
> filesystem as well...

Not necessarily.  Consider a configuration where the kernel comes in over a
network, but each board contains board-specific configuration data in
flash.  Reflashing isn't likely.

And yes, people do that.  I have a day job in the single-board-computer
industry.

> Since in a deployment situation you will always be sticking with one endianness 
> it makes sense that you would want the most speed for your buck...Since flash 
> filesystems are slow to begin with also adding in the decompression
> hit you get from cramfs...it would seem to me that adding in le<->be
> would just add to its speed reduction....That would seem to be a good
> place to trim the fat so to speak...

The speed reduction is going to be minimal.  Implement it via macros, like
it's done everywhere else.  If the endianness is one way, the macros get
optimized away.  If it's the other way, then they convert into an inlined
byte swap.

Yes, there can be a small performance hit, but it's absolutely tiny.

Matt

-- 
Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

It was a new hope.
					-- Dust Puppy
User Friendly, 12/25/1998

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

  parent reply	other threads:[~2001-12-05  1:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3C0BD8FD.F9F94BE0@mvista.com>
2001-12-04 11:38 ` [PATCH] Endianness-aware mkcramfs Daniel Marmier
2001-12-04 18:42   ` H. Peter Anvin
2001-12-05  0:36     ` Ingo Oeser
2001-12-05  0:39       ` H. Peter Anvin
2001-12-05  0:49         ` Matthew Dharm
2001-12-05  1:02           ` Jeremy Puhlman
2001-12-05  1:12             ` H. Peter Anvin
2001-12-05  1:38             ` Matthew Dharm [this message]
2001-12-05 12:23               ` Daniel Marmier
2001-12-06  6:04                 ` H. Peter Anvin
2001-12-06 14:12       ` Pavel Machek
2001-12-18  2:52   ` Daniel Quinlan

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=20011204173819.C29968@one-eyed-alien.net \
    --to=mdharm-kernel@one-eyed-alien.net \
    --cc=hpa@zytor.com \
    --cc=ingo.oeser@informatik.tu-chemnitz.de \
    --cc=jpuhlman@mvista.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.