Current-Users archive

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

Re: swapctl: SWAP_STATS different to SWAP_NSWAP (2 != 3)



    Date:        Thu, 12 Feb 2026 11:20:44 +0100
    From:        Thomas Klausner <wiz%netbsd.org@localhost>
    Message-ID:  <aY2pPkPdTMcndDhR%exadelic.gatalith.at@localhost>

  | I think that might have made it worse:

Please try again with HEAD (current, tip, ... whatever) from
after the date of this e-mail (say after Fri 13th 03:45).

Yes, this is the Friday the 13th Swap Listing Massacre!

There still needs to be a fix to swapctl(8) - the message you are
seeing is simply wrong, and needs to be obliterated.

However, it is wrong when concurrently with running swapctl -[sl],
swap devices are being added or deleted, which is not your issue.

The kernel problem which you have encountered should be fixed now,
I hope.   I won't change swapctl(8) until you have had an opportunity
to confirm that (as best as is ever possible with these race condition
issues) as if I did that, it would be much harder to verify the kernel
change - so just avoid adding or deleting swap devices while listing
the swap info, and I think now that all should be OK.   But I don't have
the environment that you have to thrash things, my systems simply never
swap at all, so please use caution.

Note that this is the same fix that Matthew tried, just implemented
differently (a much more brutal change to the code.)

kre



Home | Main Index | Thread Index | Old Index