public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Manfred Spraul" <manfred@colorfullife.com>
To: "Jes Sorensen" <jes@linuxcare.com>
Cc: "Mark Hemment" <markhe@veritas.com>, <linux-kernel@vger.kernel.org>
Subject: Re: Q: explicit alignment control for the slab allocator
Date: Wed, 7 Mar 2001 21:32:45 +0100	[thread overview]
Message-ID: <003601c0a746$57ab5750$5517fea9@local> (raw)
In-Reply-To: <Pine.LNX.4.21.0103011800460.11260-100000@alloc> <3A9EA940.CB82665C@colorfullife.com> <d3lmqhny9w.fsf@lxplus015.cern.ch>

From: "Jes Sorensen" <jes@linuxcare.com>
> >>>>> "Manfred" == Manfred Spraul <manfred@colorfullife.com> writes:
>
> Manfred> Mark Hemment wrote:
> >> As no one uses the feature it could well be broken, but is that a
> >> reason to change its meaning?
>
> Manfred> Some hardware drivers use HW_CACHEALIGN and assume certain
> Manfred> byte alignments, and arm needs 1024 byte aligned blocks.
>
> Isn't that just a reinvention of SMP_CACHE_BYTES? Or are there
> actually machines out there where the inbetween CPU cache line size
> differs from the between CPU and DMA controller cache line size?
>
No.

First of all HW_CACHEALIGN aligns to the L1 cache, not SMP_CACHE_BYTES.
Additionally you sometimes need a guaranteed alignment for other
problems, afaik ARM needs 1024 bytes for some structures due to cpu
restrictions, and several usb controllers need 16 byte alignment.

And some callers of kmem_cache_create() want SMP_CACHE_BYTES alignment,
other callers (and DaveM) expect L1_CACHE_BYTES alignment.

It's more a API clarification than a real change.

I think it can wait until 2.5:
drivers should use pci_alloc_consistent_pool(), not
kmalloc_aligned()+virt_to_bus(), arm can wait and the ability to choose
between SMP and L1 alignment is not that important.

--
    Manfred


  reply	other threads:[~2001-03-07 20:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-01 17:26 Q: explicit alignment control for the slab allocator Manfred Spraul
2001-03-01 18:09 ` Mark Hemment
2001-03-01 19:55   ` Manfred Spraul
2001-03-01 20:28     ` Mark Hemment
2001-03-01 21:55       ` Manfred Spraul
2001-03-02 10:59         ` Mark Hemment
2001-03-02 11:51           ` Manfred Spraul
2001-03-02 12:39             ` Mark Hemment
2001-03-02 13:22               ` Manfred Spraul
2001-03-07 20:02     ` Jes Sorensen
2001-03-07 20:32       ` Manfred Spraul [this message]
2001-03-08 17:30         ` Jes Sorensen
2001-03-01 19:22 ` David S. Miller
2001-03-01 19:47   ` Manfred Spraul

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='003601c0a746$57ab5750$5517fea9@local' \
    --to=manfred@colorfullife.com \
    --cc=jes@linuxcare.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markhe@veritas.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