Hi all,

As Tomek said, whatever you choose to do, please make sure everything of this is absolutely kept optional, at least during the merge and community validation phase.

I dont think connecting these proposals to CONFIG_BUILD_KERNEL is granular enough.

Thanks,

Sebastien

Le 18/04/2023 à 09:18, Ville Juven a écrit :
Hi all,

Sorry, this is going a bit off topic.

One wild solution specifically to solve my/our problem
(CONFIG_BUILD_KERNEL) might be to force a "next power-of-two alignment" for
the semaphore. This would ensure that the semaphore ALWAYS fits within a
single page and remove the need for cross page checks / mappings in this
specific case.

Although I will still implement a more generic map function (it's almost
done anyway), in the case of semaphores this would simply mean that no
semaphore will ever need to be explicitly mapped into kernel memory,
fetching the page pool mapping will be enough.

For our case the size of sem_t is 32 or 40 bytes (depending on
configuration), this would be aligned to 32 ot 64-bytes which ensures that
the entire structure fits in a single page. The alignment requirement can
also be flagged behind CONFIG_BUILD_KERNEL, as such a requirement is not
necessary for the flat addressing modes.

What do you think? Too wild, or something worth considering / acceptable ?

Br,
Ville Juven / pussuw on github

On Mon, Apr 17, 2023 at 8:58 PM Tomek CEDRO <to...@cedro.info> wrote:

if it possible to add new functionality as optional feature?

--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info

Reply via email to