Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1269195

Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions

From okaya@codeaurora.org
Newsgroups linux.kernel
Subject Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions
Date 2015-11-13 21:30 +0100
Message-ID <qut8R-2FM-1@gated-at.bofh.it> (permalink)
References (6 earlier) <qriMF-ys-1@gated-at.bofh.it> <qrrwC-6v5-21@gated-at.bofh.it> <qrvqz-ys-59@gated-at.bofh.it> <qs5aF-75Z-1@gated-at.bofh.it> <qsyFH-PU-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


>>
>> I looked at this. IMO, merging selftest code and dmatest code is not
>> a good idea.
>>
>> Dmatest code has been well written and structured so that multiple
>> DMA capabilities (XOR, PQ, MEMCPY) can be tested with the same code.
>>
>> It supports threads and user space interaction.
>>
>> The code I want to change (dmatest_func) is 3 levels deep in
>> structure. My refactored code looked really ugly compared to the
>> original code.
>
> dmatest_func is still a bigger fn specific to dmatest. I was thinking that
> we
> should have rather have two common functions
> 1) dmatest_do_dma() which does buffer allocation, invoking dmaengine APIs
> and
> checking results, part of dmatest_func today
>
> 2) request_channels() would also be common along with cleanup routines
>

Tried again,

It still doesn't look right. Depending on the used API, the source and
destination buffers are different.

For instance, when you use dma_map_page, your source addresses are pages.
If you use scatter_sg, you are working on the scatter-gather list. If you
use dma_coherent, then the source cannot be a kmalloc API. Source comes
from the DMA API. If you use dma_map_single, it is a kmalloc buffer. This
is causing havoc in the compare APIs.

IMO, in the goals of sharing code, we are making it unmanageable.

I'm leaning towards dropping this patch altogether (which I'm not very
happy about) or pushing it this way and have somebody do the
reorganization in another iteration.




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V2 2/3] dmaselftest: add memcpy selftest support functions Sinan Kaya <okaya@codeaurora.org> - 2015-11-02 07:10 +0100
  Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions Sinan Kaya <okaya@codeaurora.org> - 2015-11-03 05:20 +0100
    Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions Vinod Koul <vinod.koul@intel.com> - 2015-11-03 07:40 +0100
      Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions Dan Williams <dan.j.williams@intel.com> - 2015-11-03 08:50 +0100
        Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-11-03 09:30 +0100
          Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions Vinod Koul <vinod.koul@intel.com> - 2015-11-03 17:10 +0100
            Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions Sinan Kaya <okaya@codeaurora.org> - 2015-11-05 03:50 +0100
              Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions Vinod Koul <vinod.koul@intel.com> - 2015-11-05 13:10 +0100
                Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions Sinan Kaya <okaya@codeaurora.org> - 2015-11-05 17:20 +0100
                Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions Sinan Kaya <okaya@codeaurora.org> - 2015-11-07 07:30 +0100
                Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions Vinod Koul <vinod.koul@intel.com> - 2015-11-08 15:00 +0100
                Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support  functions okaya@codeaurora.org - 2015-11-13 21:30 +0100
        Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions Sinan Kaya <okaya@codeaurora.org> - 2015-11-03 17:00 +0100
        Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions Vinod Koul <vinod.koul@intel.com> - 2015-11-03 17:10 +0100
    Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions Timur Tabi <timur@codeaurora.org> - 2015-11-03 15:40 +0100
      Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions Vinod Koul <vinod.koul@intel.com> - 2015-11-03 17:10 +0100
        Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions Sinan Kaya <okaya@codeaurora.org> - 2015-11-03 17:30 +0100
          Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions Timur Tabi <timur@codeaurora.org> - 2015-11-03 17:50 +0100
            Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions Sinan Kaya <okaya@codeaurora.org> - 2015-11-03 18:00 +0100
        Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions Timur Tabi <timur@codeaurora.org> - 2015-11-03 17:50 +0100
  Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions Vinod Koul <vinod.koul@intel.com> - 2015-11-03 05:20 +0100

csiph-web