Re: reduce fragmentation: patch for 2.1.108 fs/namei.c

Andi Kleen (ak@muc.de)
Wed, 15 Jul 1998 18:54:39 +0200


On Wed, Jul 15, 1998 at 06:48:29PM +0200, Bill Hawes wrote:
> Andi Kleen wrote:
>
> > I think it would be better to just remove the quicklist altogether. If
> > you look at the path in __get_free_page() it doesn't add too much overhead,
> > and I think preventing L1 icache pollution should always have priority :)
>
> I too had doubts about the value of the quicklist, and so added the
> comment asking whether anyone had actually benchmarked it. So maybe
> someone will come forward with a "yes, using the quicklist produced x%
> improvement" -- but otherwise I would agree that removing it would be
> better.

Agreed.

Another thing I found while reading namei.c:

static inline int do_getname(const char *filename, char *page)
{
int retval;
unsigned long len = PAGE_SIZE;

if ((unsigned long) filename >= TASK_SIZE) {
if (!segment_eq(get_fs(), KERNEL_DS))
return -EFAULT;
} else if (TASK_SIZE - (unsigned long) filename < PAGE_SIZE)
len = TASK_SIZE - (unsigned long) filename;

retval = strncpy_from_user((char *)page, filename, len);
if (retval > 0) {

This looks dubious too me. Isn't the split between kernel and user
memory architecture dependent, and who says that the user task is lower
than the kernel memory? I think this test should be moved into
asm/uaccess.h.

-Andi

-
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.altern.org/andrebalsa/doc/lkml-faq.html