Re: [PATCH] generic: test swapping process pages in and out of a swapfile

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

 



On Thu, Aug 19, 2021 at 11:26:46AM -0700, Darrick J. Wong wrote:
> +	printf("Dirtying memory.\n");
> +	fflush(stdout);
> +
> +	/* Dirty the memory to force this program to be swapped out. */
> +	for (p = pstart; p < pend; p += pagesize)
> +		*p = 'X';

What I liked about dhowells' program was that it checked whether the
pages brought back in from swap were the same ones that had been written
to swap.  As a block filesystem person, you only know the misery of having
swap go behind your back to the block device.  As a network filesystem
person, David is acutely aware of the misery of having to remember to
use page_file_index() instead of page->index in order to avoid reading
a page from the wrong offset in the swap partition.

Yes, our swap code is nasty in many different ways, why do you ask?



[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