* Re: [OT] NS83820 2.6.0-test5 driver seems unstable on IA64
@ 2003-09-24 2:40 n0ano
0 siblings, 0 replies; 2+ messages in thread
From: n0ano @ 2003-09-24 2:40 UTC (permalink / raw)
To: linux-ia64
The same way it did all exceptions, painfully slow :-) I still think the
software exception handling on the i860 was one of it's big Achile's heels
but it got killed for other reasons before that became an issue.
On Tue, Sep 23, 2003 at 05:04:08PM -0700, David S. Miller wrote:
> On Tue, 23 Sep 2003 17:13:33 -0700
> Grant Grundler <iod00d@hp.com> wrote:
>
> > It might. I be happy to share what I know about i860/i960 over pizza.
> > I worked on ATT SVR4 port to i860 in 1989/90 and things were quite
> > different then...
>
> Q: How does an OS context switch work on the i860?
> A: The user sneezes and the kernel cleans up after it.
>
> I've hung out with i860 hackers already in my past :)
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
n0ano@n0ano.com
Ph: 303/447-2201
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: NS83820 2.6.0-test5 driver seems unstable on IA64
@ 2003-09-23 18:21 Luck, Tony
2003-09-23 18:29 ` Benjamin LaHaise
0 siblings, 1 reply; 2+ messages in thread
From: Luck, Tony @ 2003-09-23 18:21 UTC (permalink / raw)
To: David S. Miller, davidm
Cc: davidm, peter, bcrl, ak, iod00d, peterc, linux-ns83820,
linux-ia64, linux-kernel
> As I understand it, you even do this stupid printk for user apps
> as well, that makes it more than rediculious. I'd be surprised
> if anyone can find any useful kernel messages on an ia64 system
> in the dmesg output with all the unaligned access crap there.
I don't think that it is "normal" for applications to do unaligned
memory access. It means that:
a) the programmer is playing fast and loose with types and/or casts.
b) the end-user is going to be disappointed with the performance.
Looking at a couple of ia64 build servers here I see zero unaligned
access messages in the logs.
-Tony
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: NS83820 2.6.0-test5 driver seems unstable on IA64
2003-09-23 18:21 Luck, Tony
@ 2003-09-23 18:29 ` Benjamin LaHaise
2003-09-23 18:51 ` Grant Grundler
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin LaHaise @ 2003-09-23 18:29 UTC (permalink / raw)
To: Luck, Tony
Cc: David S. Miller, davidm, davidm, peter, ak, iod00d, peterc,
linux-ns83820, linux-ia64, linux-kernel
On Tue, Sep 23, 2003 at 11:21:35AM -0700, Luck, Tony wrote:
> Looking at a couple of ia64 build servers here I see zero unaligned
> access messages in the logs.
ip options can still be an odd number of bytes. Having itanic spew bogus
log messages is just plain wrong (yet another hardware issue pushed off on
software for no significant gain).
-ben
--
"The software industry today survives only through an unstated agreement
not to stir things up too much. We must hope this lawsuit [by SCO] isn't
the big stirring spoon." -- Ian Lance Taylor, Linux Journal, June 2003
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: NS83820 2.6.0-test5 driver seems unstable on IA64
2003-09-23 18:29 ` Benjamin LaHaise
@ 2003-09-23 18:51 ` Grant Grundler
2003-09-23 18:51 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Grant Grundler @ 2003-09-23 18:51 UTC (permalink / raw)
To: Benjamin LaHaise
Cc: Luck, Tony, David S. Miller, davidm, davidm, peter, ak, iod00d,
peterc, linux-ns83820, linux-ia64, linux-kernel
On Tue, Sep 23, 2003 at 02:29:25PM -0400, Benjamin LaHaise wrote:
...
> (yet another hardware issue pushed off on software for no significant gain).
Even x86 pays at least a one cycle penalty for every misaligned access.
In general, open source code has no excuse for using misaligned fields.
It's (mostly) avoidable. TCP/IP headers are the historical exception.
One could make the same arguement that a modern NIC should not require
16 byte alignment for DMA. It's a tradeoff one way or the other.
Just a matter of perspective.
grant
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: NS83820 2.6.0-test5 driver seems unstable on IA64
2003-09-23 18:51 ` Grant Grundler
@ 2003-09-23 18:51 ` David S. Miller
2003-09-23 20:38 ` Grant Grundler
0 siblings, 1 reply; 2+ messages in thread
From: David S. Miller @ 2003-09-23 18:51 UTC (permalink / raw)
To: Grant Grundler
Cc: bcrl, tony.luck, davidm, davidm, peter, ak, iod00d, peterc,
linux-ns83820, linux-ia64, linux-kernel
On Tue, 23 Sep 2003 11:51:04 -0700
Grant Grundler <iod00d@hp.com> wrote:
> Even x86 pays at least a one cycle penalty for every misaligned access.
Yes, one cycle, and it's completely lost in the noise when it
happens.
> In general, open source code has no excuse for using misaligned fields.
> It's (mostly) avoidable. TCP/IP headers are the historical exception.
It's not the TCP/IP headers intrinsically, it's what they are embedded
inside of.
For example, if the ethernet driver (as nearly all of our's do which
can) optimized for an ethernet header followed by an IP header, guess
what? That causes ethernet header followed by appletalk followed
by IP to do unaligned accesses.
It is an unavoidable axoim in the kernel networking. Unaligned accesses
will happen, and they aren't a bug and therefore not worthy of mention
in the kernel logs any more than "page was freed" :-)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: NS83820 2.6.0-test5 driver seems unstable on IA64
2003-09-23 18:51 ` David S. Miller
@ 2003-09-23 20:38 ` Grant Grundler
2003-09-23 20:45 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Grant Grundler @ 2003-09-23 20:38 UTC (permalink / raw)
To: David S. Miller
Cc: bcrl, tony.luck, davidm, davidm, peter, ak, peterc, linux-ns83820,
linux-ia64, linux-kernel
On Tue, Sep 23, 2003 at 11:51:22AM -0700, David S. Miller wrote:
> > Even x86 pays at least a one cycle penalty for every misaligned access.
>
> Yes, one cycle, and it's completely lost in the noise when it happens.
Depends on the app - for the networking stack, I agree.
To revisit Ben's comment: if we know something is likely to be misaligned,
a RISC processor can efficiently load both parts and merge them (one cycle
penalty vs a regular aligned load). Given misaligned accesses are infrequent
enough to affect performance, it makes sense to do this in SW because
it reduces cost of the HW design/test/mfg cycles.
...
> It is an unavoidable axoim in the kernel networking. Unaligned accesses
> will happen, and they aren't a bug and therefore not worthy of mention
> in the kernel logs any more than "page was freed" :-)
Ok. If the kernel networking stack used get_unaligned() in the one place
Peter originally found, x86/sparc64?/et al wouldn't see a difference.
It would avoid traps on ia64 and parisc. Bad idea?
Any other arches it might help/hurt on?
grant
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: NS83820 2.6.0-test5 driver seems unstable on IA64
2003-09-23 20:38 ` Grant Grundler
@ 2003-09-23 20:45 ` David S. Miller
2003-09-23 22:35 ` Grant Grundler
0 siblings, 1 reply; 2+ messages in thread
From: David S. Miller @ 2003-09-23 20:45 UTC (permalink / raw)
To: Grant Grundler
Cc: bcrl, tony.luck, davidm, davidm, peter, ak, peterc, linux-ns83820,
linux-ia64, linux-kernel
On Tue, 23 Sep 2003 13:38:19 -0700
Grant Grundler <iod00d@hp.com> wrote:
> Given misaligned accesses are infrequent enough to affect
> performance, it makes sense to do this in SW because
> it reduces cost of the HW design/test/mfg cycles.
Intel actually optimizes this on the P4, what is your
response to that? Is Intel wasting they time? :-)
> Ok. If the kernel networking stack used get_unaligned() in the one place
> Peter originally found, x86/sparc64?/et al wouldn't see a difference.
> It would avoid traps on ia64 and parisc. Bad idea?
> Any other arches it might help/hurt on?
It's needed on every access to every TCP and IP header portion
for the case we're talking about in this thread, where the network
device driver gives the networking a packet that ends up with
unaligned IP and TCP headers.
I once considered adding some get_unaligned() uses to the TCP option
parsing code, guess who rejected that patch? It wasn't me, it was
Linus himself and I came to learn that he's right on this one.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: NS83820 2.6.0-test5 driver seems unstable on IA64
2003-09-23 20:45 ` David S. Miller
@ 2003-09-23 22:35 ` Grant Grundler
2003-09-23 23:35 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Grant Grundler @ 2003-09-23 22:35 UTC (permalink / raw)
To: David S. Miller
Cc: bcrl, tony.luck, davidm, davidm, peter, ak, peterc, linux-ns83820,
linux-ia64, linux-kernel
On Tue, Sep 23, 2003 at 01:45:29PM -0700, David S. Miller wrote:
> Intel actually optimizes this on the P4, what is your
> response to that? Is Intel wasting they time? :-)
nono...but Intel doesn't have a choice on x86.
They have to optimize for the binaries that are out there.
Compatibility is everything in that market space.
And someone at Intel obviously agrees the newer architectures
should support misaligned access in SW since ever RISC chip
they've built (starting with i860, ~1989) does it that way.
> It's needed on every access to every TCP and IP header portion
> for the case we're talking about in this thread, where the network
> device driver gives the networking a packet that ends up with
> unaligned IP and TCP headers.
Yeah, I don't use most LAN features (PPPoE, VLAN, Appletalk, etc).
I naively thought there must be a subset everyone uses...but defining
that subset sounds like a rat hole I shouldn't go near.
> I once considered adding some get_unaligned() uses to the TCP option
> parsing code, guess who rejected that patch? It wasn't me, it was
> Linus himself and I came to learn that he's right on this one.
I'm not totally comfortable with that. The NICs I care about seem to
"bias the buffer address" to compensate for some "common case".
Seems like those cases would be cheaper (and more portable) to add
the get_unaligned() calls in the networking stack....I don't know
though really.
thanks,
grant
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: NS83820 2.6.0-test5 driver seems unstable on IA64
2003-09-23 22:35 ` Grant Grundler
@ 2003-09-23 23:35 ` David S. Miller
2003-09-24 0:13 ` Grant Grundler
0 siblings, 1 reply; 2+ messages in thread
From: David S. Miller @ 2003-09-23 23:35 UTC (permalink / raw)
To: Grant Grundler
Cc: bcrl, tony.luck, davidm, davidm, peter, ak, peterc, linux-ns83820,
linux-ia64, linux-kernel
On Tue, 23 Sep 2003 15:35:40 -0700
Grant Grundler <iod00d@hp.com> wrote:
> And someone at Intel obviously agrees the newer architectures
> should support misaligned access in SW since ever RISC chip
> they've built (starting with i860, ~1989) does it that way.
That's a amusing coincidence since at least some people think ia64
will end up the same way the i860 did :-)
In the past I did always advocate things the way you are right now,
but these days I think I've been wrong the whole time and Intel on x86
is doing the right thing.
They do everything in hardware and this makes the software so much
simpler. Sure, there's a lot of architectually inherited complexity
in the x86 family, but their engineering priorities mean there is so
much other stuff you simply never have to think about as a programmer.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: NS83820 2.6.0-test5 driver seems unstable on IA64
2003-09-23 23:35 ` David S. Miller
@ 2003-09-24 0:13 ` Grant Grundler
2003-09-24 0:04 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Grant Grundler @ 2003-09-24 0:13 UTC (permalink / raw)
To: David S. Miller
Cc: bcrl, tony.luck, davidm, davidm, peter, ak, peterc, linux-ns83820,
linux-ia64, linux-kernel
On Tue, Sep 23, 2003 at 04:35:42PM -0700, David S. Miller wrote:
> On Tue, 23 Sep 2003 15:35:40 -0700
> Grant Grundler <iod00d@hp.com> wrote:
>
> > And someone at Intel obviously agrees the newer architectures
> > should support misaligned access in SW since ever RISC chip
> > they've built (starting with i860, ~1989) does it that way.
>
> That's a amusing coincidence since at least some people think ia64
> will end up the same way the i860 did :-)
It might. I be happy to share what I know about i860/i960 over pizza.
I worked on ATT SVR4 port to i860 in 1989/90 and things were quite
different then...
> In the past I did always advocate things the way you are right now,
> but these days I think I've been wrong the whole time and Intel on x86
> is doing the right thing.
I'm not so interested in "right" or "wrong". I'd just like to see other
arches besides x86 work well (ia64, parisc in particular) and that includes
how linux deals with unaligned accesses. If x86 is the gold standard
for "the right way", we'd be using bounce buffers for DMA to highmem
(well, PAE support would get added somehow) and 64-bit kernels wouldn't
have happened...but linux so far seems to accomodate other arches *when
reasonable*. I'll follow Andrew Morton's comments...
> They do everything in hardware and this makes the software so much
> simpler. Sure, there's a lot of architectually inherited complexity
> in the x86 family, but their engineering priorities mean there is so
> much other stuff you simply never have to think about as a programmer.
Yes, true. But I think we are digressing from the original thread here...
(/me works his way around another really big rat hole :^)
thanks,
grant
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: NS83820 2.6.0-test5 driver seems unstable on IA64
2003-09-24 0:13 ` Grant Grundler
@ 2003-09-24 0:04 ` David S. Miller
2003-09-24 2:40 ` [OT] " n0ano
0 siblings, 1 reply; 2+ messages in thread
From: David S. Miller @ 2003-09-24 0:04 UTC (permalink / raw)
To: Grant Grundler
Cc: bcrl, tony.luck, davidm, davidm, peter, ak, peterc, linux-ns83820,
linux-ia64, linux-kernel
On Tue, 23 Sep 2003 17:13:33 -0700
Grant Grundler <iod00d@hp.com> wrote:
> It might. I be happy to share what I know about i860/i960 over pizza.
> I worked on ATT SVR4 port to i860 in 1989/90 and things were quite
> different then...
Q: How does an OS context switch work on the i860?
A: The user sneezes and the kernel cleans up after it.
I've hung out with i860 hackers already in my past :)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [OT] NS83820 2.6.0-test5 driver seems unstable on IA64
2003-09-24 0:04 ` David S. Miller
@ 2003-09-24 2:40 ` n0ano
0 siblings, 0 replies; 2+ messages in thread
From: n0ano @ 2003-09-24 2:40 UTC (permalink / raw)
To: David S. Miller
Cc: Grant Grundler, bcrl, tony.luck, davidm, davidm, peter, ak,
peterc, linux-ns83820, linux-ia64, linux-kernel
The same way it did all exceptions, painfully slow :-) I still think the
software exception handling on the i860 was one of it's big Achile's heels
but it got killed for other reasons before that became an issue.
On Tue, Sep 23, 2003 at 05:04:08PM -0700, David S. Miller wrote:
> On Tue, 23 Sep 2003 17:13:33 -0700
> Grant Grundler <iod00d@hp.com> wrote:
>
> > It might. I be happy to share what I know about i860/i960 over pizza.
> > I worked on ATT SVR4 port to i860 in 1989/90 and things were quite
> > different then...
>
> Q: How does an OS context switch work on the i860?
> A: The user sneezes and the kernel cleans up after it.
>
> I've hung out with i860 hackers already in my past :)
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
n0ano@n0ano.com
Ph: 303/447-2201
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-09-24 2:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-24 2:40 [OT] NS83820 2.6.0-test5 driver seems unstable on IA64 n0ano
-- strict thread matches above, loose matches on Subject: below --
2003-09-23 18:21 Luck, Tony
2003-09-23 18:29 ` Benjamin LaHaise
2003-09-23 18:51 ` Grant Grundler
2003-09-23 18:51 ` David S. Miller
2003-09-23 20:38 ` Grant Grundler
2003-09-23 20:45 ` David S. Miller
2003-09-23 22:35 ` Grant Grundler
2003-09-23 23:35 ` David S. Miller
2003-09-24 0:13 ` Grant Grundler
2003-09-24 0:04 ` David S. Miller
2003-09-24 2:40 ` [OT] " n0ano
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.