From: Vinod Koul <vkoul@kernel.org>
To: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: Takashi Iwai <tiwai@suse.de>,
Joris Verhaegen <verhaegen@google.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Cezary Rojewski <cezary.rojewski@intel.com>,
Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
Bard Liao <yung-chuan.liao@linux.intel.com>,
Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
Kai Vehmanen <kai.vehmanen@linux.intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
Srinivas Kandagatla <srini@kernel.org>,
Daniel Baluta <daniel.baluta@nxp.com>,
Orson Zhai <orsonzhai@gmail.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
Chunyan Zhang <zhang.lyra@gmail.com>,
Kunihiko Hayashi <hayashi.kunihiko@socionext.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
kernel-team@android.com, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org, patches@opensource.cirrus.com,
linux-arm-msm@vger.kernel.org,
sound-open-firmware@alsa-project.org,
linux-arm-kernel@lists.infradead.org,
Miller Liang <millerliang@google.com>
Subject: Re: [PATCH v4 2/3] ALSA: compress_offload: Add SNDRV_COMPRESS_TSTAMP64 ioctl
Date: Tue, 19 Aug 2025 10:38:08 +0530 [thread overview]
Message-ID: <aKQGuPgwXE-Unzeq@vaman> (raw)
In-Reply-To: <aKMzGRzeRqkOwTNS@opensource.cirrus.com>
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
next prev parent reply other threads:[~2025-08-19 5:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-01 9:27 [PATCH v4 0/3] ALSA: compress_offload: Add 64-bit safe timestamp API Joris Verhaegen
2025-08-01 9:27 ` [PATCH v4 1/3] ALSA: compress_offload: Add 64-bit safe timestamp infrastructure Joris Verhaegen
2025-08-01 12:05 ` Mark Brown
2025-08-01 9:27 ` [PATCH v4 2/3] ALSA: compress_offload: Add SNDRV_COMPRESS_TSTAMP64 ioctl Joris Verhaegen
2025-08-05 4:47 ` Vinod Koul
2025-08-05 5:59 ` Takashi Iwai
2025-08-18 14:05 ` Charles Keepax
2025-08-19 5:08 ` Vinod Koul [this message]
2025-08-21 7:18 ` Takashi Iwai
2025-09-05 9:17 ` George Verhaegen
2025-08-06 11:34 ` George Verhaegen
2025-08-01 9:27 ` [PATCH v4 3/3] ALSA: compress_offload: Add SNDRV_COMPRESS_AVAIL64 ioctl Joris Verhaegen
2025-08-05 4:50 ` Vinod Koul
2025-08-21 8:53 ` George Verhaegen
2025-08-01 9:59 ` [PATCH v4 0/3] ALSA: compress_offload: Add 64-bit safe timestamp API Charles Keepax
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aKQGuPgwXE-Unzeq@vaman \
--to=vkoul@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=ckeepax@opensource.cirrus.com \
--cc=daniel.baluta@nxp.com \
--cc=hayashi.kunihiko@socionext.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=kernel-team@android.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=millerliang@google.com \
--cc=orsonzhai@gmail.com \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
--cc=ranjani.sridharan@linux.intel.com \
--cc=sound-open-firmware@alsa-project.org \
--cc=srini@kernel.org \
--cc=tiwai@suse.com \
--cc=tiwai@suse.de \
--cc=verhaegen@google.com \
--cc=yung-chuan.liao@linux.intel.com \
--cc=zhang.lyra@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox