Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1265092
| From | Vinod Koul <vinod.koul@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V2 2/3] dmaselftest: add memcpy selftest support functions |
| Date | 2015-11-08 15:00 +0100 |
| Message-ID | <qsyFH-PU-1@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <qqMjN-53W-33@gated-at.bofh.it> <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> |
| Organization | linux.* mail to news gateway |
On Sat, Nov 07, 2015 at 01:23:34AM -0500, Sinan Kaya wrote: > > > On 11/5/2015 11:17 AM, Sinan Kaya wrote: > > > > > >On 11/5/2015 7:05 AM, Vinod Koul wrote: > >>On Wed, Nov 04, 2015 at 09:42:46PM -0500, Sinan Kaya wrote: > >>>Here is what I proposed. > >>> > >>>- a common file that gets compiled into a module that wants to use > >>>self-test with a public API. It can be called from driver's probe > >>>routine. > >>>- the test is independent of my implementation. It uses dmaengine > >>>API and should be portable to most drivers. > >>>- there *are* still drivers in the kernel that has selftest code > >>>embedded inside them. I followed the design pattern from other > >>>drivers thinking this must have been a good idea and it paid off for > >>>me. > >>> > >>>As far as I understand, there is interest in doing more than this > >>>and reusing the dmatest code for code duplication. > >> > >>the code that selftest uses to test will be very similar to dmatest code, > >>both of these _should_ share this common code so that fixes get done for > >>both! > >> > > > >OK, I can move the code around and try to combine it if possible. > > > > 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 > >>>Facts: > >>>- Dmatest can be actually configured to run during boot. > >>>- Nobody besides the dma driver developer uses dmatest. This leaves > >>>holes for regressions that are really hard to debug due to > >>>interaction with the rest of the system. > >>>- Dmatest doesn't exist in most distribution kernels. > >> > >>That doesn't mean it is not useful. This line of thought is not quite > >>right. > >>You are trying to say dmatest in not important and selftest is. Sorry but > >>you are wrong, both are equally important and since both try to test > >>and use > >>similar routines (dmaengien API) they need to share the code and not > >>duplicate it > >> > >>>If we want to do something else, I need clear directions. I can > >>>remove the self test code completely from my driver. But, I need an > >>>equivalent functionality. > >> > >>Add selftest to dmatest, we need both! > >> > > > >OK, do you have any objections to compiling dmatest along with hidma in > >the same module and calling a function from there ? or do you have > >something else in your mind ? Not the dmatest completely, that won't be right, but yes for the dmatest core which is common b/w both. We cna put this is separate file to compile along with driver if that is users requirement -- ~Vinod -- 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 | Next — Previous in thread | Next in thread | Find similar | Unroll 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