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.
>
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.
Thanks,
Charles
[Index of Archives]
[Pulseaudio]
[Linux Audio Users]
[ALSA Devel]
[Fedora Desktop]
[Fedora SELinux]
[Big List of Linux Books]
[Yosemite News]
[KDE Users]