Re: [PATCH] Introduce compat_u64 and compat_s64 types

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Woodhouse
Date: Friday, June 15, 2007 - 6:00 am

On Fri, 2007-06-15 at 13:54 +0100, Alan Cox wrote:

I still think we could use a 'get_maybe_but_probably_not_unaligned()',
although it could have a better name.

People now use get_unaligned() for two reasons -- firstly because we
_expect_ something to be unaligned, and we get a performance improvement
if we just emit code to directly handle that instead of taking the trap.
And more recently we've also started to use it because there's a
_slight_ chance it could be unaligned, and some architectures can't
cope.

Where the unalignment is possible but unlikely, many architectures
probably shouldn't be emitting code to cope with it; they should just
take the trap in the rare case.

In fact, the probability threshold at which it makes sense to just take
the trap will vary from architecture to architecture. We should probably
just have a get_probably_unaligned(...) macro which has its first arg as
an _estimated_ constant probability. Then the architecture code could
emit what it likes according to the probability.

-- 
dwmw2

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: drm: fix radeon setparam on 32/64 bit systems., David Woodhouse, (Fri Jun 15, 1:44 am)
Re: drm: fix radeon setparam on 32/64 bit systems., Benjamin Herrenschmidt, (Fri Jun 15, 1:58 am)
Re: drm: fix radeon setparam on 32/64 bit systems., Arnd Bergmann, (Fri Jun 15, 2:28 am)
[PATCH] Introduce compat_u64 and compat_s64 types, Arnd Bergmann, (Fri Jun 15, 2:31 am)
Re: [PATCH] Introduce compat_u64 and compat_s64 types, David Miller, (Fri Jun 15, 2:55 am)
Re: [PATCH] Introduce compat_u64 and compat_s64 types, David Woodhouse, (Fri Jun 15, 5:00 am)
Re: [PATCH] Introduce compat_u64 and compat_s64 types, Arnd Bergmann, (Fri Jun 15, 5:03 am)
Re: [PATCH] Introduce compat_u64 and compat_s64 types, David Howells, (Fri Jun 15, 5:09 am)
Re: [PATCH] Introduce compat_u64 and compat_s64 types, Matthew Wilcox, (Fri Jun 15, 5:11 am)
Re: [PATCH] Introduce compat_u64 and compat_s64 types, David Woodhouse, (Fri Jun 15, 5:38 am)
Re: [PATCH] Introduce compat_u64 and compat_s64 types, Arnd Bergmann, (Fri Jun 15, 5:42 am)
Re: [PATCH] Introduce compat_u64 and compat_s64 types, David Woodhouse, (Fri Jun 15, 5:47 am)
Re: [PATCH] Introduce compat_u64 and compat_s64 types, David Woodhouse, (Fri Jun 15, 6:00 am)
Re: [PATCH] Introduce compat_u64 and compat_s64 types, Benjamin Herrenschmidt, (Fri Jun 15, 6:16 am)
Re: [PATCH] Introduce compat_u64 and compat_s64 types, Benjamin Herrenschmidt, (Fri Jun 15, 6:19 am)
Re: [PATCH] Introduce compat_u64 and compat_s64 types, David Woodhouse, (Fri Jun 15, 6:32 am)
Re: [PATCH] Introduce compat_u64 and compat_s64 types, Matthew Wilcox, (Fri Jun 15, 6:45 am)
Re: [PATCH] Introduce compat_u64 and compat_s64 types, Arnd Bergmann, (Fri Jun 15, 6:52 am)
Re: [PATCH] Introduce compat_u64 and compat_s64 types, Benjamin Herrenschmidt, (Fri Jun 15, 4:54 pm)
Re: [PATCH] Introduce compat_u64 and compat_s64 types, David Woodhouse, (Sat Jun 16, 1:31 am)
Re: [PATCH] Introduce compat_u64 and compat_s64 types, David Woodhouse, (Sat Jun 16, 2:38 am)
Re: [PATCH] Introduce compat_u64 and compat_s64 types, Arnd Bergmann, (Sat Jun 16, 3:26 am)
Re: [PATCH] Introduce compat_u64 and compat_s64 types, Arnd Bergmann, (Sat Jun 16, 4:21 am)
Re: [PATCH] Introduce compat_u64 and compat_s64 types, David Woodhouse, (Sat Jun 16, 4:34 am)
Re: [PATCH] Introduce compat_u64 and compat_s64 types, Matthew Wilcox, (Sat Jun 16, 6:56 am)