Re: git: b19740f4ce7a - main - swap_pager: lock vnode in swapdev_strategy()

From: Peter Jeremy <>
Date: Sun, 28 Nov 2021 07:53:06 UTC
On 2021-Nov-28 04:00:56 +0200, Konstantin Belousov <> wrote:
>On Sun, Nov 28, 2021 at 12:22:46PM +1100, Peter Jeremy wrote:
>> On 2021-Nov-27 01:26:17 +0200, Konstantin Belousov <> wrote:
>The cause for your panic is not the network interface down state (in fact,
>I think that interface state up), but as you correctly analyzed, the
>call to vop_nostrategy().  It is there in stack because underlying filesystem
>was unmounted, and the swap vnode was reclaimed, replacing NFS vop vector
>with deadfs vop vector, which inherits from the default vop.

OK.  Thanks for that explanation.  I saw deadfs was a potential option
but hadn't checked.

>The bit that I do not understand from your report, is why swapoff_all() did
>not occured earlier.  Your earlier report, where spurious ENOMEM came out
>from swapoff(2) syscall, and which I fixed by the previous patch, means 
>that there was an attempt to swapoff.

The ENOMEM swapoff is before the actual shutdown.  I suspect my
inclusion of that confused you, sorry.

>Still, the solution is, IMO, to swapoff before unmount. We do not need
>swapin for flushing buffers.
>Please try this combined patch.

I've had a couple of goes at rebooting whilst thrashing with lots of
swap in use and it seems happy so I think the patch is good to go.

Thanks for the patches.

Peter Jeremy