From: David Brownell <david-b@pacbell.net>
To: Manfred Spraul <manfred@colorfullife.com>, zaitcev@redhat.com
Cc: linux-usb-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: SLAB vs. pci_alloc_xxx in usb-uhci patch
Date: Mon, 05 Mar 2001 14:52:24 -0800 [thread overview]
Message-ID: <00d401c0a5c6$f289d200$6800000a@brownell.org> (raw)
In-Reply-To: <001f01c0a5c0$e942d8f0$5517fea9@local>
> > And mm/slab.c changes semantics when CONFIG_SLAB_DEBUG
> > is set: it ignores SLAB_HWCACHE_ALIGN. That seems more like
> > the root cause of the problem to me!
>
> HWCACHE_ALIGN does not guarantee a certain byte alignment. And
> additionally it's not even guaranteed that kmalloc() uses that
> HWCACHE_ALIGN.
> Uhci is broken, not my slab code ;-)
If so, the slab code docs/specs are broken too ... I just checked in
my development tree (2.4.2-ac7 plus goodies) and what's written
is that HWCACHE_ALIGN is to "Align the objects in this cache to
a hardware cacheline." Which contradicts what you just wrote;
it's supposed to always align, not do so only when convenient.
Clearly, something in mm/slab.c needs to change even if it's just
changing the spec for kmem_cache_create() behavior.
> I'd switch to pci_alloc_consistent with some optimizations to avoid
> wasting a complete page for each DMA header. (I haven't seen Johannes
> patch, but we discussed the problem 6 weeks ago and that proposal was
> the end of the thread)
I didn't see that thread. I agree, pci_alloc_consistent() already has
a signature that's up to the job. The change you suggest would need
to affect every architecture's implementation of that code ... which
somehow seems not the best solution at this time.
Perhaps we should have different functions for pci consistent alloc
at the "hardware" level (what we have now) and at the "slab" level.
That's sort of what Johannes' patch did, except it was specific to
that one driver rather than being a generic utility. Of course, I'd
rather that such a generic package have all the debug support
(except broken redzoning :-) that the current slab code does.
- Dave
next prev parent reply other threads:[~2001-03-05 22:57 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3AA91B2C.BEB85D8C@colorfullife.com>
2001-03-05 22:08 ` Manfred Spraul
2001-03-05 22:52 ` David Brownell [this message]
2001-03-05 23:20 ` Russell King
2001-03-06 2:09 ` Alan Cox
2001-03-06 2:29 ` [linux-usb-devel] " David Brownell
2001-03-06 4:53 ` David S. Miller
2001-03-09 16:18 ` SLAB vs. pci_alloc_xxx in usb-uhci patch [RFC: API] David Brownell
2001-03-09 18:21 ` David S. Miller
2001-03-09 18:35 ` [linux-usb-devel] " Johannes Erdfelt
2001-03-09 19:42 ` David Brownell
2001-03-09 20:07 ` David S. Miller
2001-03-09 21:14 ` David Brownell
2001-03-09 22:34 ` Pete Zaitcev
2001-03-09 18:35 ` Alan Cox
2001-03-09 18:29 ` David Brownell
2001-03-09 19:14 ` Pete Zaitcev
2001-03-09 19:37 ` David Brownell
2001-03-09 19:04 ` Gérard Roudier
2001-03-09 22:42 ` David Brownell
2001-03-09 21:07 ` Gérard Roudier
2001-03-10 3:11 ` David Brownell
2001-03-09 21:38 ` [linux-usb-devel] " Alan Cox
2001-03-09 20:00 ` David S. Miller
2001-03-09 20:07 ` David S. Miller
2001-03-06 5:44 SLAB vs. pci_alloc_xxx in usb-uhci patch Peter Zaitcev
2001-03-06 23:13 ` David Brownell
2001-03-07 7:05 ` Manfred Spraul
2001-03-07 17:43 ` David Brownell
-- strict thread matches above, loose matches on Subject: below --
2001-03-05 19:23 Peter Zaitcev
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='00d401c0a5c6$f289d200$6800000a@brownell.org' \
--to=david-b@pacbell.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=manfred@colorfullife.com \
--cc=zaitcev@redhat.com \
/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
all inboxes | Powered by JetHome®