[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGsJ_4woVFtej3HU7vXt2wDSDLGkr_wrqzBP6SqV73O-h2AoSg@mail.gmail.com>
Date: Wed, 22 Oct 2025 21:21:03 +1300
From: Barry Song <21cnbao@...il.com>
To: Qinxin Xia <xiaqinxin@...wei.com>
Cc: m.szyprowski@...sung.com, robin.murphy@....com, prime.zeng@...wei.com,
fanghao11@...wei.com, linux-kernel@...r.kernel.org, linuxarm@...wei.com,
wangzhou1@...ilicon.com
Subject: Re: [PATCH v4] tools/dma: move dma_map_benchmark from selftests to tools/dma
On Wed, Oct 22, 2025 at 9:16 PM Qinxin Xia <xiaqinxin@...wei.com> wrote:
>
>
>
> On 2025/10/22 12:23:04, Barry Song <21cnbao@...il.com> wrote:
> >>
> >> #define DMA_MAP_BENCHMARK _IOWR('d', 1, struct map_benchmark)
> >> #define DMA_MAP_MAX_THREADS 1024
> >> @@ -27,5 +29,7 @@ struct map_benchmark {
> >> __u32 dma_dir; /* DMA data direction */
> >> __u32 dma_trans_ns; /* time for DMA transmission in ns */
> >> __u32 granule; /* how many PAGE_SIZE will do map/unmap once a time */
> >> + __u8 expansion[76]; /* For future use */
> >> };
> >
> > I didn’t realize you were hiding a bugfix within the code cleanup.
> >
> > We agreed this is a hotfix that should be merged promptly[1]. Before sending
> > v5, please submit the hotfix first using the existing folder (without moving
> > the code from selftest to tools). Once it is merged, resend v5 based on it.
> >
> > [1] https://lore.kernel.org/lkml/f8c0cbdc-9c68-46bb-8dad-1d7c80f3f741@samsung.com/
> >
> > Thanks
> > Barry
>
> Hello Barry:
> For the previous patch has not merged, I have carefully considered this.
> (I didn't include this in v1. You can see it in the 'Changes')
>
> Previously, struct map_benchmark is defined in map_benchmark.h. The
> header file in include/linux/ generally does not guarantee stable uABI.
> (Although it does get used in userspace, I thought that's because we
> include the kernel header in userspace.Referencing kernel headers in
> userspace programs is inherently risky)
>
> This patch moves map_benchmark.h from include/linux to include/uapi
> /linux. I think maybe it's reasonable to restore that here...
>
> I'm sure you have more experience in this area, and if you still insist
> on separation, I will prepare v5 based on merged version.
Please treat the hotfix as a true hotfix, meaning it should contain only the
fix—nothing else. We must ensure that each patch does exactly one job.
The hotfix should include a Fixes: tag and be Cc: stable so it can be
backported to stable kernel releases.
Thanks
Barry
Powered by blists - more mailing lists