Re: [RFC PATCH] discarding swap

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

 



Hugh Dickins wrote:
> > Does swap do that, when a page on the disk is deallocated and then used
> > for something else?
> 
> Yes, that's managed through the PageWriteback flag: there are various
> places where we'd like to free up swap, but cannot do so because it's
> still attached to a cached page with PageWriteback set; in which case
> its freeing has to be left until vmscan.c finds PageWriteback cleared,
> then removes page from swapcache and frees the swap.

Here's an idea which is prompted by DISCARD:

One thing the request layer doesn't do is cancellations.
But if it did:

If you schedule some swap to be written, then later it is no longer
required before the WRITE has completed (e.g. process exits), on a
busy system would it be worth _cancelling_ the WRITE while it's still
in the request queue?  This is quite similar to DISCARDing, but
internal to the kernel.

(Many userspace AIO interfaces do have cancellations, perhaps this is why).

-- Jamie
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux