Messages in this thread | | | Date | Sun, 8 Aug 2004 17:04:59 +0100 (BST) | From | Hugh Dickins <> | Subject | Re: [PATCH] Allow to disable shmem.o |
| |
On Sun, 8 Aug 2004, Matt Mackall wrote: > On Sun, Aug 08, 2004 at 02:03:09PM +0100, Hugh Dickins wrote: > > > > But I prefer Matt's tiny tiny-shmem.c which does support all those, > > using ramfs instead, and says in Kconfig what it's doing. > > But perhaps you're wanting to avoid ramfs too? > > Ramfs is hard to avoid as it's used internally for / at boot and so on.
Ah, right.
> My patch for comparison. Comments appreciated.
Looks pretty good, but would need rediffing against mainline or -mm if heading that way: the init/Kconfig patch is peculiar to your -tiny.
The comment at the head of tiny-shmem.c:
> + * This is intended for small system where the benefits of the full > + * shmem code (swap-backed and resource-limited) are outweighed by their > + * complexity. On systems without swap and not using userspace /dev/shm, > + * this code should be effectively equivalent, but much lighter weight.
Very fair statement. But isn't it actually supporting /dev/shm fine?
And your shmem_file_setup hasn't quite kept up with the times: shmat oopses in vma_link because shmem_file_setup is lacking a
file->f_mapping = inode->i_mapping;
Plus Andi rightly advises externs in a header file.
Hugh
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |