9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] sheevaplug SD card driver
Date: Fri, 19 Oct 2012 11:30:39 -0400	[thread overview]
Message-ID: <5ac1687f3033e5bc4c6a8f0896f5a974@ladd.quanstro.net> (raw)
In-Reply-To: <ed91f7ee5db4e3779d7fffb51ec5f9b7@hamnavoe.com>

On Fri Oct 19 10:01:11 EDT 2012, 9fans@hamnavoe.com wrote:
> > could you explain the ccmalloc trick?
>
> "cache coherent malloc" - not really a trick, just a way to
> ensure SD buffers are cache-aligned and occupy an integral
> number of cache lines, to avoid embarrassment when doing
> dma on ARM (which bypasses the cache).  It costs a bit of
> space but saves copying.

that's what i thought.

we ran into this problem and decided that it was easiest to just
cacheline-align everything in malloc, at the obvious expense of
a tiny bit of memory.  the reason for this was we were using a few
kw devices that could get just about any chunk of malloc'd memory.

ideally we would have written a kw-specific malloc with tracking
segregated from the managed memory.

- erik



  reply	other threads:[~2012-10-19 15:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-18 12:42 Richard Miller
2012-10-18 13:46 ` Gorka Guardiola
2012-10-18 14:24 ` David du Colombier
2012-10-19 13:36   ` Richard Miller
2012-10-19 13:47     ` erik quanstrom
2012-10-19 14:00       ` Richard Miller
2012-10-19 15:30         ` erik quanstrom [this message]
2012-10-19 15:39           ` Richard Miller
2012-10-19 15:46             ` erik quanstrom
2012-10-19 16:03               ` Richard Miller
2012-10-19 21:30                 ` Charles Forsyth
2012-10-19 21:49                   ` erik quanstrom
2012-10-19 21:59                     ` Charles Forsyth
2012-11-10 12:20                     ` Richard Miller
2012-10-18 16:05 ` Skip Tavakkolian
2012-10-19 15:21 lucio
2012-10-19 15:33 ` Richard Miller
2012-10-19 16:01   ` lucio
2012-10-19 15:39 ` Skip Tavakkolian
2012-11-10 13:24 Erik Quanstrom

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=5ac1687f3033e5bc4c6a8f0896f5a974@ladd.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /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;
as well as URLs for NNTP newsgroup(s).