From: Ivan Orlov <ivan.orlov0322@gmail.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
perex@perex.cz, tiwai@suse.com, corbet@lwn.net,
broonie@kernel.org, shuah@kernel.org
Cc: linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
aholzinger@gmx.de
Subject: Re: [PATCH 3/4] ALSA: timer: Introduce virtual userspace-driven timers
Date: Sun, 28 Jul 2024 12:54:55 +0100 [thread overview]
Message-ID: <b9ac0ee3-18af-459d-958e-3b8122e7bb9d@gmail.com> (raw)
In-Reply-To: <c73da5fd-51a9-4744-9687-0ebc56c34fca@wanadoo.fr>
On 7/28/24 11:29, Christophe JAILLET wrote:
>
> I may be wrong but I think that ida allocates hunks for 1024 bits (128
> bytes * 8) at a time. (see [1])
>
> So with this extra sape and the sapce for the xarray, it would waste a
> few bytes of memory, yes.
>
> With ida, there is also some locking that may be unnecessary (but harmless)
>
>
> Hoping, I got it right, here are a few numbers:
>
> On a x86_64, with allmodconfig:
>
> Your initial patch:
> text data bss dec hex filename
> 55020 1783 268 57071 deef sound/core/timer.o
>
> With ida:
> 54763 1631 116 56510 dcbe sound/core/timer.o
> + 128 bytes of runtime memory allocation
>
> With bitmap:
> 54805 1535 132 56472 dc98 sound/core/timer.o
>
>
> I think that the code would be slightly more elegant with ida, but
> implementing it with a bitmap does not add that much complexity.
>
Ah, alright, I agree that the code would be cleaner when using IDA, and
such a small memory overhead won't be significant/noticeable. I'm going
to use IDA in the V2 instead of bitmap API, thank you so much for
pointing me to it (I was wondering if the Kernel has a generic ID
allocator and now I finally know it does :) ).
Thank you!
--
Kind regards,
Ivan Orlov
next prev parent reply other threads:[~2024-07-28 11:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-26 7:47 [PATCH 0/4] Introduce userspace-driven ALSA timers Ivan Orlov
2024-07-26 7:47 ` [PATCH 1/4] ALSA: aloop: Allow using global timers Ivan Orlov
2024-07-26 7:47 ` [PATCH 2/4] Docs/sound: Add documentation for userspace-driven ALSA timers Ivan Orlov
2024-07-26 7:47 ` [PATCH 3/4] ALSA: timer: Introduce virtual userspace-driven timers Ivan Orlov
2024-07-28 6:52 ` Christophe JAILLET
2024-07-28 8:49 ` Ivan Orlov
2024-07-28 6:59 ` Christophe JAILLET
2024-07-28 8:51 ` Ivan Orlov
2024-07-28 9:30 ` Christophe JAILLET
2024-07-28 9:42 ` Ivan Orlov
2024-07-28 10:29 ` Christophe JAILLET
2024-07-28 11:54 ` Ivan Orlov [this message]
2024-07-26 7:47 ` [PATCH 4/4] selftests: ALSA: Cover userspace-driven timers with test Ivan Orlov
2024-07-28 6:10 ` kernel test robot
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=b9ac0ee3-18af-459d-958e-3b8122e7bb9d@gmail.com \
--to=ivan.orlov0322@gmail.com \
--cc=aholzinger@gmx.de \
--cc=broonie@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=shuah@kernel.org \
--cc=tiwai@suse.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