Re: [PATCH] mm: unify shmem and tiny-shmem

From: David Howells
Date: Wed Oct 01 2008 - 11:05:48 EST


Matt Mackall <mpm@xxxxxxxxxxx> wrote:

> (This applies on top of Nick's second tiny-shmem patch, which hasn't
> made it to mainline yet(!). But as this deletes tiny-shmem.c, you can
> probably ignore the rejects.)
>
> tiny-shmem shares most of its 130 lines of code with shmem and tends
> to break when particular bits of shmem get modified. Unifying saves
> code and makes keeping these two in sync much easier.
>
> before:
> 14367 392 24 14783 39bf mm/shmem.o
> 396 72 8 476 1dc mm/tiny-shmem.o
>
> after:
> 14367 392 24 14783 39bf mm/shmem.o
> 412 72 8 492 1ec mm/shmem.o tiny
>
> Signed-off-by: Matt Mackall <mpm@xxxxxxxxxxx>

Works with my test program:

http://people.redhat.com/~dhowells/doshm.c

Compile and run:

doshm sysv

warthog>size mm/tiny-shmem.o
text data bss dec hex filename
788 36 4 828 33c mm/tiny-shmem.o
warthog>size mm/shmem.o
text data bss dec hex filename
832 36 4 872 368 mm/shmem.o


Acked-by: David Howells <dhowells@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/