[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<TY3PR01MB11346B1955B75840FBA892C8C86DE2@TY3PR01MB11346.jpnprd01.prod.outlook.com>
Date: Thu, 4 Jul 2024 08:56:46 +0000
From: Biju Das <biju.das.jz@...renesas.com>
To: Uwe Kleine-König <u.kleine-koenig@...libre.com>, Andrew
Morton <akpm@...ux-foundation.org>
CC: Nicolas Pitre <nico@...xnic.net>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2 2/2] mul_u64_u64_div_u64: basic sanity test
Hi All,
> -----Original Message-----
> From: Biju Das
> Sent: Thursday, July 4, 2024 7:41 AM
> Subject: RE: [PATCH v2 2/2] mul_u64_u64_div_u64: basic sanity test
>
> Hi All,
>
> > -----Original Message-----
> > From: Uwe Kleine-König <u.kleine-koenig@...libre.com>
> > Sent: Wednesday, July 3, 2024 10:36 PM
> > Subject: Re: [PATCH v2 2/2] mul_u64_u64_div_u64: basic sanity test
> >
> > Hello Andrew,
> >
> > On Wed, Jul 03, 2024 at 01:47:10PM -0400, Nicolas Pitre wrote:
> > > On Wed, 3 Jul 2024, Andrew Morton wrote:
> > >
> > > > On Tue, 2 Jul 2024 23:34:09 -0400 Nicolas Pitre <nico@...xnic.net> wrote:
> > > >
> > > > > Verify that edge cases produce proper results, and some more.
> > > >
> > > > Awesome, thanks.
> > > >
> > > > Do you know of any situations in which the present implementation
> > > > causes issues?
> > >
> > > Uwe could probably elaborate further, but the example given in the
> > > first commit log is causing trouble for a driver he's working on.
> >
> > Actually the example was a constructed one. I became aware of
> > mul_u64_u64_div_u64() being only an approximation while reviewing a pwm driver by Biju Das:
> >
> > https://lore.kernel.org/linux-
> > pwm/TYCPR01MB1126992DD51F714AEDADF0A4F868DA@...PR01MB11269.jpnprd01.pr
> > od.outlook.com
> >
> > mul_u64_u64_div_u64 is used in various pwm drivers, but in practise
> > the periods used are small enough to not be problematic for the status
> > quo implementation since commit 8c86fb68ffcb
> > ("mul_u64_u64_div_u64: increase precision by conditionally swapping a
> > and b"). At least I think Biju (added to Cc:) only hit this problem during testing, and not in a
> real world application.
> >
> > I intend to do a performance test of Nico's code. I hope I get to that tomorrow.
>
> I should be able to test the new patch[1] with [2] as mul_u64_u64_div_u64() used in [2].
>
> [1] https://lkml.org/lkml/2024/6/28/1130
> [2] https://lore.kernel.org/linux-renesas-soc/20240614154242.419043-1-biju.das.jz@bp.renesas.com/
>
> I will test and provide feedback soon.
I tested the patch [1] with [2] (CONFIG_PWM_DEBUG=y)
I don't see any idempotent issues. So,
Tested-by: Biju Das <biju.das.jz@...renesas.com>
Cheers,
Biju
Powered by blists - more mailing lists