From: David Woodhouse <dwmw2@infradead.org>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: Linus Torvalds <torvalds@osdl.org>,
Thomas Gleixner <tglx@linutronix.de>,
Greg Weeks <greg.weeks@timesys.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.4] jffs2 aligment problems
Date: Mon, 07 Jun 2004 20:14:03 +0100 [thread overview]
Message-ID: <1086635643.29255.46.camel@localhost.localdomain> (raw)
In-Reply-To: <20040607174147.I28526@flint.arm.linux.org.uk>
On Mon, 2004-06-07 at 17:41 +0100, Russell King wrote:
> > Pleas fix jffs2 to use the proper "get_unaligned()"/"put_unaligned()"
> > instead.
> I'll let you have a bun fight with dwmw2 and networking people over
> this. I'm standing well clear. 8)
S'fine by me. I already added get_unaligned() to the flash drivers years
ago -- it's actually those, not JFFS2 itself which needs it. Alan
insisted I remove it on the basis that much of our network code is
similarly broken anyway; an arch without fixups is dead in the water
whatever happens.
Admittedly it's not _entirely_ stupid in the network code, because a
direct load is often a lot faster than the byte-wise load emitted by
get_unaligned(). If alignment is the common case, it makes some sense to
optimise that and take the trap only occasionally.
But with uClinux being merged (many uClinux arches can't fix up
alignment at all), I think we should revisit that decision.
Anything which _could_ be unaligned should be marked as such, even if we
do have two levels ('possibly unaligned', 'probably unaligned') where
the latter behaves purely as an optimisation on most arches, just like
our current get_unaligned() does.
Or in fact since the ratio between the speeds of the inline and the trap
version varies wildly from arch to arch, and hence the point at which it
becomes more efficient just to use the current get_unaligned() varies --
perhaps we should have 'get_unaligned(ptr, probability)' and let the
arch code decide where the threshold should be. It's not that hard to
make it go away completely given __builtin_constant_p(probability) and
some preprocessor macros.
--
dwmw2
next prev parent reply other threads:[~2004-06-07 19:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-07 15:08 [PATCH 2.4] jffs2 aligment problems Greg Weeks
2004-06-07 15:36 ` Thomas Gleixner
2004-06-07 16:03 ` Linus Torvalds
2004-06-07 16:41 ` Russell King
2004-06-07 19:14 ` David Woodhouse [this message]
2004-06-07 19:22 ` Linus Torvalds
2004-06-07 20:39 ` David Woodhouse
2004-06-07 20:54 ` Linus Torvalds
2004-06-07 20:56 ` Thomas Gleixner
2004-06-07 21:29 ` David Woodhouse
2004-06-07 21:40 ` Thomas Gleixner
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=1086635643.29255.46.camel@localhost.localdomain \
--to=dwmw2@infradead.org \
--cc=greg.weeks@timesys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+lkml@arm.linux.org.uk \
--cc=tglx@linutronix.de \
--cc=torvalds@osdl.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