linux-embedded.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: ksummit-2009-discuss@lists.linux-foundation.org,
	linux-arch@vger.kernel.org, linux-embedded@vger.kernel.org
Subject: Re: [Ksummit-2009-discuss] Representing Embedded Architectures at the Kernel Summit
Date: Wed, 03 Jun 2009 12:19:57 -0400	[thread overview]
Message-ID: <1244045997.21423.303.camel@mulgrave.site> (raw)
In-Reply-To: <1244034286.24482.84.camel@pc1117.cambridge.arm.com>

On Wed, 2009-06-03 at 14:04 +0100, Catalin Marinas wrote:
> Hi,
> 
> On Tue, 2009-06-02 at 15:22 +0000, James Bottomley wrote:
> > So what we're looking for is a proposal to discuss the issues
> > most affecting embedded architectures, or preview any features affecting
> > the main kernel which embedded architectures might need ... or any other
> > topics from embedded architectures which might need discussion or
> > debate.
> 
> Some issues that come up on embedded systems (and not only):
> 
>       * Multiple coherency domains for devices - the system may have
>         multiple bus levels, coherency ports, cache levels etc. Some
>         devices in the system (but not all) may be able to "see" various
>         cache levels but the DMA API (at least on ARM) cannot handle
>         this. It may be useful to discuss how other embedded
>         architectures handle this and come up with a unified solution

So this is partially what the dma_sync_for_{device|cpu} is supposed to
be helping with.  By and large, the DMA API tries to hide the
complexities of coherency domains from the user.  The actual API, as far
as it goes, seems to do this OK.  We have synchronisation issues that
mmiowb() and friends help with ... what's the actual problem here?

>       * Better support for coherent DMA mask - currently ZONE_DMA is
>         assumed to be in the bottom part of the memory which isn't
>         always the case. Enabling NUMA may help but it is overkill for
>         some systems. As above, a more unified solution across
>         architectures would help

So ZONE_DMA and coherent memory allocation as represented by the
coherent mask are really totally separate things.  The idea of ZONE_DMA
was really that if you had an ISA device, allocations from ZONE_DMA
would be able to access the allocated memory without bouncing.  Since
ISA is really going away, this definition has been hijacked.  If your
problem is just that you need memory allocated on a certain physical
mask and neither GFP_DMA or GFP_DMA32 cut it for you, then we could
revisit the kmalloc_mask() proposal again ... but the consensus last
time was that no-one really had a compelling use case that couldn't be
covered by GFP_DMA32.

>       * PIO block devices and non-coherent hardware - code like mpage.c
>         assumes that the either the hardware is coherent or the device
>         driver performs the cache flushing. The latter is true for
>         DMA-capable device but not for PIO. The issue becomes visible
>         with write-allocate caches and the device driver may not have
>         the struct page information to call flush_dcache_page(). A
>         proposed solution on the ARM lists was to differentiate (via
>         some flags) between PIO and DMA block devices and use this
>         information in mpage.c

flush_dcache_page() is supposed to be for making the data visible to the
user ... that coherency is supposed to be managed by the block layer.
The DMA API is specifically aimed at device to kernel space
coherency ... although if you line up all your aliases, that can also be
device to userspace.  Technically though we have two separate APIs for
user<->kernel coherency and device<->kernel coherency.  What's the path
you're seeing this problem down?  SG_IO to a device doing PIO should be
handling this correctly.

>       * Mixed endianness devices in the same system - this may only need
>         dedicated readl_be/writel_be etc. macros but it could also be
>         done by having bus-aware readl/writel-like macros

We have ioreadXbe for this exact case (similar problem on parisc)

>       * Asymmetric MP:
>               * Different CPU frequencies
>               * Different CPU features (e.g. floating point only one
>                 some CPUs): scheduler awareness, per-CPU hwcap bits (in
>                 case user space wants to set the affinity) 
>               * Asymmetric workload balancing for power consumption (may
>                 be better to load 1 CPU at 60% than 4 at 15%) 

This actually just works(tm) for me on a voyager system running SMP with
a mixed 486/586 set of processors ... what's the problem?  The only
issue I see is that you have to set the capabilities of the boot CPU to
the intersection of the mixture otherwise setup goes wrong, but
otherwise it seems to work OK.

James


  parent reply	other threads:[~2009-06-03 16:19 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-02 15:22 Representing Embedded Architectures at the Kernel Summit James Bottomley
2009-06-02 17:29 ` Josh Boyer
2009-06-02 17:42   ` James Bottomley
2009-06-02 17:52     ` David VomLehn
2009-06-02 18:25       ` James Bottomley
2009-06-02 18:51         ` Josh Boyer
2009-06-02 19:30           ` Tim Bird
2009-06-02 20:37             ` [Ksummit-2009-discuss] " James Bottomley
2009-06-02 20:44               ` Bill Gatliff
2009-06-02 21:34               ` Robert Schwebel
2009-06-03  3:35                 ` Greg KH
     [not found]                   ` <20090731152617.GW29245@pengutronix.de>
2009-07-31 15:53                     ` flicker free booting Robert Schwebel
2009-07-31 18:03                       ` David VomLehn
2009-07-31 18:09                         ` Robert Schwebel
2009-07-31 18:42                           ` Bill Gatliff
2009-08-03  8:19                             ` Sascha Hauer
2009-08-03  8:37                               ` Geert Uytterhoeven
2009-07-31 18:46                         ` Bill Gatliff
2009-07-31 19:48                           ` Tim Bird
2009-07-31 19:51                             ` Bill Gatliff
2009-07-31 20:05                             ` Robert Schwebel
2009-08-01  1:26                               ` Tim Bird
2009-07-31 19:25                       ` Bill Gatliff
2009-08-01 14:25                         ` Jamie Lokier
2009-06-03  0:03               ` [Ksummit-2009-discuss] Representing Embedded Architectures at the Kernel Summit David VomLehn
2009-06-03  0:52                 ` Eric W. Biederman
2009-06-03  1:42                 ` Steven Rostedt
2009-06-02 22:21   ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-03  6:24     ` [Ksummit-2009-discuss] " Ralf Baechle
2009-06-10 23:13     ` Kumar Gala
2009-06-14  3:48       ` Grant Likely
2009-06-10 23:08   ` Kumar Gala
2009-06-02 17:29 ` Grant Likely
2009-06-02 17:45   ` David VomLehn
2009-06-02 18:46     ` Grant Likely
2009-06-02 17:48   ` James Bottomley
2009-06-03 12:17     ` Mark Brown
2009-06-04 18:18     ` Grant Likely
2009-06-02 21:10   ` Russell King
2009-06-02 21:16     ` Bill Gatliff
2009-06-02 21:18     ` Geert Uytterhoeven
2009-06-02 21:40     ` Robert Schwebel
     [not found]     ` <20090602214005.GL32630@pengutronix.de>
2009-06-02 21:48       ` Russell King
     [not found]     ` <10f740e80906021418i1d58f5eer940e7a8ec9fb8b9e@mail.gmail.com>
2009-06-03  7:07       ` [Ksummit-2009-discuss] " Ralf Baechle
2009-06-04 20:08     ` Grant Likely
     [not found]     ` <4A2596B4.3020309@billgatliff.com>
2009-06-04 20:15       ` Grant Likely
     [not found]     ` <3340601010994331832@unknownmsgid>
2009-06-04 20:24       ` Grant Likely
2009-06-03  6:53   ` [Ksummit-2009-discuss] " Ralf Baechle
2009-06-03 13:04 ` Catalin Marinas
2009-06-03 13:18   ` Josh Boyer
2009-06-03 13:45     ` Catalin Marinas
2009-06-03 14:11       ` Josh Boyer
2009-06-03 14:06   ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-03 16:19   ` James Bottomley [this message]
2009-06-03 17:09     ` Russell King
2009-06-03 18:43       ` Andrew Morton
2009-06-03 19:01         ` James Bottomley
2009-06-04  3:11         ` David VomLehn (dvomlehn)
2009-06-04  3:24           ` Mike Frysinger
2009-06-04  9:23           ` Mel Gorman
2009-06-03 19:08     ` Catalin Marinas
2009-06-10  9:42     ` Thomas Petazzoni
2009-06-16  6:42 ` Mike Rapoport
2009-06-16  8:06   ` Mike Frysinger
2009-06-16 12:19     ` [Ksummit-2009-discuss] " Ralf Baechle
2009-06-17  4:26       ` H. Peter Anvin
2009-06-17 15:04         ` Ralf Baechle
2009-06-17 17:14           ` H. Peter Anvin
2009-06-16 16:06     ` Grant Likely
2009-06-16 18:18       ` Jamie Lokier
2009-06-16 19:28         ` Grant Likely
2009-06-16 20:07           ` Jamie Lokier
2009-06-16 20:10             ` Marcel Holtmann
2009-06-16 21:04             ` Grant Likely
2009-06-18  3:05   ` Paul Mundt
2009-06-17 14:31 ` Kumar Gala
2009-06-18  2:51   ` Paul Mundt
2009-06-19  2:59     ` Kumar Gala
2009-06-19  3:00       ` Paul Mundt
2009-06-19  7:53         ` Kumar Gala

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=1244045997.21423.303.camel@mulgrave.site \
    --to=james.bottomley@hansenpartnership.com \
    --cc=catalin.marinas@arm.com \
    --cc=ksummit-2009-discuss@lists.linux-foundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-embedded@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 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).