Re: PG_clean for shared mapping smart syncing

Stephen C. Tweedie (sct@redhat.com)
Sat, 19 Dec 1998 16:36:54 GMT


Hi,

On Sat, 19 Dec 1998 17:23:13 +0100 (CET), Andrea Arcangeli
<andrea@e-mind.com> said:

> I've put a new patch with as difference only a bit of credits added ;) at:
> ftp://e-mind.com/pub/linux/kernel-patches/pgclean-0-2.1.132-2.diff.gz

> All tests I done here are been succesfully (and I am using huge size of
> memory just to be sure to notice any kind of mm corruption). Does somebody
> has some test suite for shared mappings or could suggest me a proggy that
> uses heavly shared mappings?

ftp.uk.linux.org:/pub/linux/sct/vm/shm-stress.tar.gz

It currently uses only sysV shared maps, but it would be trivial to
extend it to use shared map files. Let me know if you make the change
and I'll merge the patch in.

The test stuff uses separate shared-write regions for testing: one
smaller region is used as a bitmap, and the code keeps primitive
spinlocks in this bit to synchronise access to the rest of the shared
memory. The rest of the shared memory is used as a test heap --- just a
collection of separate test pages --- and a pattern array. We store
random patterns in the first word of each test page in the heap, and
(under spinlock) assign the same pattern atomically to both the test
page and the appropriate entry in the pattern array. Use a sufficiently
large test heap and you can test shared-page swapping quite effectively.

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/