bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Provide a module for `clear_cache'


From: Marc Nieper-Wißkirchen
Subject: Re: Provide a module for `clear_cache'
Date: Mon, 6 Nov 2023 19:51:37 +0100

Hello Bruno,

Am Mo., 6. Nov. 2023 um 19:33 Uhr schrieb Bruno Haible <bruno@clisp.org>:

[...]

I can provide such a thing easily. In fact, I have it already sitting
around on my disk since 2021 :-)

This is great!
 
> GNU
> lightning currently calls libgcc's `__clear_cache' directly ([1]), but this
> will fail on systems that do not have libgcc.

And also, libgcc's __clear_cache does not always work. My comments say:

  /* GCC >= 4.3 has a GCC built-in.
     <https://gcc.gnu.org/onlinedocs/gcc-4.3.6/gcc/Other-Builtins.html>
     But it's sometimes not correctly implemented.

So, I can provide the module's code. Can you provide a unit test for it?

I only have access to x86_64 systems, for which `clear_cache ()' can be a no-op.  Emulators aren't of much help because they usually do not implement the need for cache invalidation faithfully.  We would need the help of someone with, say, an Aarch64 system.

If we want to support a wider variety of systems, the code of Chez Scheme may be helpful.  The `S_doflush' function ([1]) does the cache clearing.

--



reply via email to

[Prev in Thread] Current Thread [Next in Thread]