All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH 6/8] hwmon: add max1111/max1110 Low-power
Date: Tue, 23 Sep 2008 07:23:25 +0000	[thread overview]
Message-ID: <20080923072325.GA22016@flint.arm.linux.org.uk> (raw)
In-Reply-To: <f17812d70809022312y6fd288ffu2607761414152f77@mail.gmail.com>

On Tue, Sep 23, 2008 at 09:31:09AM +0800, Eric Miao wrote:
> > Allocating such small buffers using kmalloc seems pretty inefficient.
> > At the very least, I would allocate both buffers at once. But quite
> > frankly I don't get why you don't just make these buffers part of
> > struct max1111_data. This would even make the structure smaller!
> >
> 
> I originally place the buffer within "struct max1111_data" but received
> a mail from David Brownell suggesting using a kmalloc() buffer, so that
> DMA mode will work better with the cache alignment and trailing bytes,
> though PIO can just work happily. I don't know the specific reason for
> this, honestly.

Having cachelines overlap with other data which may be modified during
the DMA causes problems on non-cache coherent hardware.  It's much
safer to ensure that DMA buffers don't share cache lines with anything
else.

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  parent reply	other threads:[~2008-09-23  7:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-03  6:12 [lm-sensors] [PATCH 6/8] hwmon: add max1111/max1110 Low-power Eric Miao
2008-09-21 11:02 ` Jean Delvare
2008-09-23  1:31 ` Eric Miao
2008-09-23  2:40 ` Eric Miao
2008-09-23  5:15 ` David Brownell
2008-09-23  7:23 ` Russell King - ARM Linux [this message]
2008-09-23  8:34 ` Jean Delvare
2008-09-23  9:13 ` David Brownell
2008-09-23  9:52 ` Trent Piepho

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=20080923072325.GA22016@flint.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=lm-sensors@vger.kernel.org \
    /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 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.