Thread (11 messages) 11 messages, 5 authors, 2008-03-25

Re: [PATCH/RFC v2] introduce ARCH_CAN_UNALIGNED_ACCESS Kconfig symbol

From: John W. Linville <hidden>
Date: 2008-03-20 22:08:23
Also in: linux-wireless, lkml

On Thu, Mar 20, 2008 at 10:21:46PM +0100, Johannes Berg wrote:
quoted
I think you're semantically testing the wrong thing.

It's not if unaligned accesses are supported, it's if they are
efficient enough or not.

For example, sparc64 fully handles unaligned accesses but taking the
trap to fix it up is slow.  So sparc64 "can" handle unaligned
accesses, but whether we want to set this symbol or not is another
matter.
Yeah, good point. Should I rename it to HAVE_EFFICIENT_UNALIGNED_ACCESS
or similar? Or have it defined as some sort of number so you can make
actually make tradeoffs? Like Dave Woodhouse suggested at some point to
have get_unaligned() take an argument that indicates the probability...
Ugh...that sounds like premature optimization to me...

While I think Dave has a point, I don't think you should labor the word
choice too much.  Try to document it as clearly as possible and hope
for the best -- I hear that the arch maintainers are top notch! :-)

John

-- 
John W. Linville
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help