On Tue, Aug 20, 2024 at 11:34:32PM +0000, Thorsten Glaser wrote:
> 
> Just adding a “sleep” is no proper fix anyway, so the question
> is, how to wait in a shell script until the swap device is
> *really* swapoff’d when the syscall returns too early, and
> (someone from the Linux kernel maintainers reading this?) should
> I report the latter as a bug against the kernel?
> 
I forget where and when (a long time ago?) but I recall having learned
that prior to swapoff it is necessary to call sync and in my history I
have it like this:

sync && sync && sync && swapoff

I couldn't tell why I have sync 3 times, but I know that it's how I've
called swapoff since as far back as I can remember.

Regards,

-Roberto

-- 
Roberto C. Sánchez

Reply via email to