[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aKQGuPgwXE-Unzeq@vaman>
Date: Tue, 19 Aug 2025 10:38:08 +0530
From: Vinod Koul <vkoul@...nel.org>
To: Charles Keepax <ckeepax@...nsource.cirrus.com>
Cc: Takashi Iwai <tiwai@...e.de>, Joris Verhaegen <verhaegen@...gle.com>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Cezary Rojewski <cezary.rojewski@...el.com>,
Peter Ujfalusi <peter.ujfalusi@...ux.intel.com>,
Bard Liao <yung-chuan.liao@...ux.intel.com>,
Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>,
Kai Vehmanen <kai.vehmanen@...ux.intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.dev>,
Srinivas Kandagatla <srini@...nel.org>,
Daniel Baluta <daniel.baluta@....com>,
Orson Zhai <orsonzhai@...il.com>,
Baolin Wang <baolin.wang@...ux.alibaba.com>,
Chunyan Zhang <zhang.lyra@...il.com>,
Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>,
Masami Hiramatsu <mhiramat@...nel.org>, kernel-team@...roid.com,
linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org,
patches@...nsource.cirrus.com, linux-arm-msm@...r.kernel.org,
sound-open-firmware@...a-project.org,
linux-arm-kernel@...ts.infradead.org,
Miller Liang <millerliang@...gle.com>
Subject: Re: [PATCH v4 2/3] ALSA: compress_offload: Add
SNDRV_COMPRESS_TSTAMP64 ioctl
On 18-08-25, 15:05, Charles Keepax wrote:
> On Tue, Aug 05, 2025 at 07:59:42AM +0200, Takashi Iwai wrote:
> > On Tue, 05 Aug 2025 06:47:59 +0200,
> > Vinod Koul wrote:
> > > On 01-08-25, 10:27, Joris Verhaegen wrote:
> > > > ret = snd_compr_update_tstamp(stream, &tstamp64);
> > > > if (ret == 0) {
> > > > - snd_compr_tstamp32_from_64(&tstamp32, &tstamp64);
> > > > - ret = copy_to_user((struct snd_compr_tstamp __user *)arg,
> > > > - &tstamp32, sizeof(tstamp32)) ?
> > > > + if (is_32bit) {
> > > > + snd_compr_tstamp32_from_64(&tstamp32, &tstamp64);
> > > > + copy_from = &tstamp32;
> > > > + copy_size = sizeof(tstamp32);
> > > > + }
> > >
> > > Most of the applications and people would be 32bit right now and we
> > > expect this to progressively change, but then this imposes a penalty as
> > > default path is 64 bit, since we expect this ioctl to be called very
> > > frequently, should we do this optimization for 64bit here?
> >
> > Through a quick glance over the patch, I don't think you'll hit the
> > significant performance loss. It's merely a few bytes of extra copies
> > before copy_to_user(), after all. But, of course, it'd be more
> > convincing if anyone can test and give the actual numbers.
That would be better
> I am inclined to agree the impact should be very minimal and the
> only alternative is a more complex implementation. I would vote
> for leaving this as is.
But yes, we can for now, go ahead. It is internal kernel flow can be
adapted anytime :-)
--
~Vinod
Powered by blists - more mailing lists