public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC][GIT PULL] dma-api debugging facility
@ 2009-03-05 20:03 Joerg Roedel
  2009-03-05 20:59 ` FUJITA Tomonori
  0 siblings, 1 reply; 6+ messages in thread
From: Joerg Roedel @ 2009-03-05 20:03 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: iommu, linux-kernel

Hi Ingo,

The following changes since commit 0bd5c4f7c874cf48ff7904dcf8a59988c8fea0e8:
  Ingo Molnar (1):
        Merge branch 'iommu/fixes-2.6.29' of git://git.kernel.org/.../joro/linux-2.6-iommu into core/iommu

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu.git dma-api/debug

David Woodhouse (2):
      dma-debug: add function to dump dma mappings
      dma-debug: print stacktrace of mapping path on unmap error

Joerg Roedel (16):
      dma-debug: add Kconfig entry
      dma-debug: add header file and core data structures
      dma-debug: add hash functions for dma_debug_entries
      dma-debug: add allocator code
      dma-debug: add initialization code
      dma-debug: add kernel command line parameters
      dma-debug: add debugfs interface
      dma-debug: add core checking functions
      dma-debug: add checking for map/unmap_page/single
      dma-debug: add add checking for map/unmap_sg
      dma-debug: add checking for [alloc|free]_coherent
      dma-debug: add checks for sync_single_*
      dma-debug: add checks for sync_single_range_*
      dma-debug: add checks for sync_single_sg_*
      dma-debug: x86 architecture bindings
      dma-debug: Documentation update

 Documentation/DMA-API.txt           |  106 +++++
 Documentation/kernel-parameters.txt |   10 +
 arch/Kconfig                        |    2 +
 arch/x86/Kconfig                    |    1 +
 arch/x86/include/asm/dma-mapping.h  |   45 ++-
 arch/x86/kernel/pci-dma.c           |    6 +
 include/linux/dma-debug.h           |  167 +++++++
 lib/Kconfig.debug                   |   11 +
 lib/Makefile                        |    2 +
 lib/dma-debug.c                     |  870 +++++++++++++++++++++++++++++++++++
 10 files changed, 1214 insertions(+), 6 deletions(-)
 create mode 100644 include/linux/dma-debug.h
 create mode 100644 lib/dma-debug.c

A few changes were made since the v3 post of this code:

* new checks were added
* stack trace of mapping path is printed
* default number of preallocated entries has been increased to 32768 on
  x86 - in the latest tests I had more than 26000 dma-api allocations in
  the hash
* therefore the hash size has been increased to 1024

Please pull.

Joerg

-- 
           | Advanced Micro Devices GmbH
 Operating | Karl-Hammerschmidt-Str. 34, 85609 Dornach bei München
 System    | 
 Research  | Geschäftsführer: Jochen Polster, Thomas M. McCoy, Giuliano Meroni
 Center    | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
           | Registergericht München, HRB Nr. 43632


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC][GIT PULL] dma-api debugging facility
  2009-03-05 20:03 [RFC][GIT PULL] dma-api debugging facility Joerg Roedel
@ 2009-03-05 20:59 ` FUJITA Tomonori
  2009-03-05 22:33   ` Joerg Roedel
  0 siblings, 1 reply; 6+ messages in thread
From: FUJITA Tomonori @ 2009-03-05 20:59 UTC (permalink / raw)
  To: joerg.roedel; +Cc: mingo, iommu, linux-kernel

On Thu, 5 Mar 2009 21:03:38 +0100
Joerg Roedel <joerg.roedel@amd.com> wrote:

> Hi Ingo,
> 
> The following changes since commit 0bd5c4f7c874cf48ff7904dcf8a59988c8fea0e8:
>   Ingo Molnar (1):
>         Merge branch 'iommu/fixes-2.6.29' of git://git.kernel.org/.../joro/linux-2.6-iommu into core/iommu
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu.git dma-api/debug
> 
> David Woodhouse (2):
>       dma-debug: add function to dump dma mappings
>       dma-debug: print stacktrace of mapping path on unmap error
> 
> Joerg Roedel (16):
>       dma-debug: add Kconfig entry
>       dma-debug: add header file and core data structures
>       dma-debug: add hash functions for dma_debug_entries
>       dma-debug: add allocator code
>       dma-debug: add initialization code
>       dma-debug: add kernel command line parameters
>       dma-debug: add debugfs interface
>       dma-debug: add core checking functions
>       dma-debug: add checking for map/unmap_page/single
>       dma-debug: add add checking for map/unmap_sg
>       dma-debug: add checking for [alloc|free]_coherent
>       dma-debug: add checks for sync_single_*
>       dma-debug: add checks for sync_single_range_*
>       dma-debug: add checks for sync_single_sg_*
>       dma-debug: x86 architecture bindings
>       dma-debug: Documentation update
> 
>  Documentation/DMA-API.txt           |  106 +++++
>  Documentation/kernel-parameters.txt |   10 +
>  arch/Kconfig                        |    2 +
>  arch/x86/Kconfig                    |    1 +
>  arch/x86/include/asm/dma-mapping.h  |   45 ++-
>  arch/x86/kernel/pci-dma.c           |    6 +
>  include/linux/dma-debug.h           |  167 +++++++
>  lib/Kconfig.debug                   |   11 +
>  lib/Makefile                        |    2 +
>  lib/dma-debug.c                     |  870 +++++++++++++++++++++++++++++++++++
>  10 files changed, 1214 insertions(+), 6 deletions(-)
>  create mode 100644 include/linux/dma-debug.h
>  create mode 100644 lib/dma-debug.c
> 
> A few changes were made since the v3 post of this code:
> 
> * new checks were added
> * stack trace of mapping path is printed
> * default number of preallocated entries has been increased to 32768 on
>   x86 - in the latest tests I had more than 26000 dma-api allocations in
>   the hash
> * therefore the hash size has been increased to 1024

You have not posted patches that addressed some reviewed comments. For
example, dma-debug's dma_map_sg support is just wrong:

http://marc.info/?l=linux-kernel&m=123556055325566&w=2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC][GIT PULL] dma-api debugging facility
  2009-03-05 20:59 ` FUJITA Tomonori
@ 2009-03-05 22:33   ` Joerg Roedel
  2009-03-05 23:22     ` Chris Wright
  2009-03-06 11:20     ` Ingo Molnar
  0 siblings, 2 replies; 6+ messages in thread
From: Joerg Roedel @ 2009-03-05 22:33 UTC (permalink / raw)
  To: FUJITA Tomonori; +Cc: joerg.roedel, iommu, mingo, linux-kernel

On Fri, Mar 06, 2009 at 05:59:18AM +0900, FUJITA Tomonori wrote:
> On Thu, 5 Mar 2009 21:03:38 +0100
> Joerg Roedel <joerg.roedel@amd.com> wrote:
> 
> > Hi Ingo,
> > 
> > The following changes since commit 0bd5c4f7c874cf48ff7904dcf8a59988c8fea0e8:
> >   Ingo Molnar (1):
> >         Merge branch 'iommu/fixes-2.6.29' of git://git.kernel.org/.../joro/linux-2.6-iommu into core/iommu
> > 
> > are available in the git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu.git dma-api/debug
> > 
> > David Woodhouse (2):
> >       dma-debug: add function to dump dma mappings
> >       dma-debug: print stacktrace of mapping path on unmap error
> > 
> > Joerg Roedel (16):
> >       dma-debug: add Kconfig entry
> >       dma-debug: add header file and core data structures
> >       dma-debug: add hash functions for dma_debug_entries
> >       dma-debug: add allocator code
> >       dma-debug: add initialization code
> >       dma-debug: add kernel command line parameters
> >       dma-debug: add debugfs interface
> >       dma-debug: add core checking functions
> >       dma-debug: add checking for map/unmap_page/single
> >       dma-debug: add add checking for map/unmap_sg
> >       dma-debug: add checking for [alloc|free]_coherent
> >       dma-debug: add checks for sync_single_*
> >       dma-debug: add checks for sync_single_range_*
> >       dma-debug: add checks for sync_single_sg_*
> >       dma-debug: x86 architecture bindings
> >       dma-debug: Documentation update
> > 
> >  Documentation/DMA-API.txt           |  106 +++++
> >  Documentation/kernel-parameters.txt |   10 +
> >  arch/Kconfig                        |    2 +
> >  arch/x86/Kconfig                    |    1 +
> >  arch/x86/include/asm/dma-mapping.h  |   45 ++-
> >  arch/x86/kernel/pci-dma.c           |    6 +
> >  include/linux/dma-debug.h           |  167 +++++++
> >  lib/Kconfig.debug                   |   11 +
> >  lib/Makefile                        |    2 +
> >  lib/dma-debug.c                     |  870 +++++++++++++++++++++++++++++++++++
> >  10 files changed, 1214 insertions(+), 6 deletions(-)
> >  create mode 100644 include/linux/dma-debug.h
> >  create mode 100644 lib/dma-debug.c
> > 
> > A few changes were made since the v3 post of this code:
> > 
> > * new checks were added
> > * stack trace of mapping path is printed
> > * default number of preallocated entries has been increased to 32768 on
> >   x86 - in the latest tests I had more than 26000 dma-api allocations in
> >   the hash
> > * therefore the hash size has been increased to 1024
> 
> You have not posted patches that addressed some reviewed comments. For
> example, dma-debug's dma_map_sg support is just wrong:
> 
> http://marc.info/?l=linux-kernel&m=123556055325566&w=2

Thats fixed in the tree above. I will send out the patches tomorrow
seperatly for easier reviewing and commenting.

Joerg


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC][GIT PULL] dma-api debugging facility
  2009-03-05 22:33   ` Joerg Roedel
@ 2009-03-05 23:22     ` Chris Wright
  2009-03-06 13:07       ` Joerg Roedel
  2009-03-06 11:20     ` Ingo Molnar
  1 sibling, 1 reply; 6+ messages in thread
From: Chris Wright @ 2009-03-05 23:22 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: FUJITA Tomonori, iommu, mingo, linux-kernel

* Joerg Roedel (joro@8bytes.org) wrote:
> Thats fixed in the tree above. I will send out the patches tomorrow
> seperatly for easier reviewing and commenting.

Did you fix the incorrect usage of __cacheline_aligned_in_smp?

essentially:

-} __cacheline_aligned_in_smp;
+} ____cacheline_aligned_in_smp;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC][GIT PULL] dma-api debugging facility
  2009-03-05 22:33   ` Joerg Roedel
  2009-03-05 23:22     ` Chris Wright
@ 2009-03-06 11:20     ` Ingo Molnar
  1 sibling, 0 replies; 6+ messages in thread
From: Ingo Molnar @ 2009-03-06 11:20 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: FUJITA Tomonori, joerg.roedel, iommu, mingo, linux-kernel


* Joerg Roedel <joro@8bytes.org> wrote:

> On Fri, Mar 06, 2009 at 05:59:18AM +0900, FUJITA Tomonori wrote:
> > On Thu, 5 Mar 2009 21:03:38 +0100
> > Joerg Roedel <joerg.roedel@amd.com> wrote:
> > 
> > > Hi Ingo,
> > > 
> > > The following changes since commit 0bd5c4f7c874cf48ff7904dcf8a59988c8fea0e8:
> > >   Ingo Molnar (1):
> > >         Merge branch 'iommu/fixes-2.6.29' of git://git.kernel.org/.../joro/linux-2.6-iommu into core/iommu
> > > 
> > > are available in the git repository at:
> > > 
> > >   git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu.git dma-api/debug
> > > 
> > > David Woodhouse (2):
> > >       dma-debug: add function to dump dma mappings
> > >       dma-debug: print stacktrace of mapping path on unmap error
> > > 
> > > Joerg Roedel (16):
> > >       dma-debug: add Kconfig entry
> > >       dma-debug: add header file and core data structures
> > >       dma-debug: add hash functions for dma_debug_entries
> > >       dma-debug: add allocator code
> > >       dma-debug: add initialization code
> > >       dma-debug: add kernel command line parameters
> > >       dma-debug: add debugfs interface
> > >       dma-debug: add core checking functions
> > >       dma-debug: add checking for map/unmap_page/single
> > >       dma-debug: add add checking for map/unmap_sg
> > >       dma-debug: add checking for [alloc|free]_coherent
> > >       dma-debug: add checks for sync_single_*
> > >       dma-debug: add checks for sync_single_range_*
> > >       dma-debug: add checks for sync_single_sg_*
> > >       dma-debug: x86 architecture bindings
> > >       dma-debug: Documentation update
> > > 
> > >  Documentation/DMA-API.txt           |  106 +++++
> > >  Documentation/kernel-parameters.txt |   10 +
> > >  arch/Kconfig                        |    2 +
> > >  arch/x86/Kconfig                    |    1 +
> > >  arch/x86/include/asm/dma-mapping.h  |   45 ++-
> > >  arch/x86/kernel/pci-dma.c           |    6 +
> > >  include/linux/dma-debug.h           |  167 +++++++
> > >  lib/Kconfig.debug                   |   11 +
> > >  lib/Makefile                        |    2 +
> > >  lib/dma-debug.c                     |  870 +++++++++++++++++++++++++++++++++++
> > >  10 files changed, 1214 insertions(+), 6 deletions(-)
> > >  create mode 100644 include/linux/dma-debug.h
> > >  create mode 100644 lib/dma-debug.c
> > > 
> > > A few changes were made since the v3 post of this code:
> > > 
> > > * new checks were added
> > > * stack trace of mapping path is printed
> > > * default number of preallocated entries has been increased to 32768 on
> > >   x86 - in the latest tests I had more than 26000 dma-api allocations in
> > >   the hash
> > > * therefore the hash size has been increased to 1024
> > 
> > You have not posted patches that addressed some reviewed comments. For
> > example, dma-debug's dma_map_sg support is just wrong:
> > 
> > http://marc.info/?l=linux-kernel&m=123556055325566&w=2
> 
> Thats fixed in the tree above. I will send out the patches 
> tomorrow seperatly for easier reviewing and commenting.

Yep, re-posting them on lkml would be nice.

	Ingo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC][GIT PULL] dma-api debugging facility
  2009-03-05 23:22     ` Chris Wright
@ 2009-03-06 13:07       ` Joerg Roedel
  0 siblings, 0 replies; 6+ messages in thread
From: Joerg Roedel @ 2009-03-06 13:07 UTC (permalink / raw)
  To: Chris Wright; +Cc: Joerg Roedel, FUJITA Tomonori, iommu, mingo, linux-kernel

On Thu, Mar 05, 2009 at 03:22:19PM -0800, Chris Wright wrote:
> * Joerg Roedel (joro@8bytes.org) wrote:
> > Thats fixed in the tree above. I will send out the patches tomorrow
> > seperatly for easier reviewing and commenting.
> 
> Did you fix the incorrect usage of __cacheline_aligned_in_smp?
> 
> essentially:
> 
> -} __cacheline_aligned_in_smp;
> +} ____cacheline_aligned_in_smp;

Yes. This is fixed in the tree too.

	Joerg

-- 
           | Advanced Micro Devices GmbH
 Operating | Karl-Hammerschmidt-Str. 34, 85609 Dornach bei München
 System    | 
 Research  | Geschäftsführer: Jochen Polster, Thomas M. McCoy, Giuliano Meroni
 Center    | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
           | Registergericht München, HRB Nr. 43632


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-03-06 13:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-05 20:03 [RFC][GIT PULL] dma-api debugging facility Joerg Roedel
2009-03-05 20:59 ` FUJITA Tomonori
2009-03-05 22:33   ` Joerg Roedel
2009-03-05 23:22     ` Chris Wright
2009-03-06 13:07       ` Joerg Roedel
2009-03-06 11:20     ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox