Re: [PATCH v2] Make VM_MAX_READAHEAD a kernel parameter
From: Ankit Jain
Date: Thu Feb 11 2010 - 06:15:31 EST
> +static int __init readahead(char *str)
> +{
> + if (!str)
> + return -EINVAL;
> + vm_max_readahead_kb = memparse(str, &str) / 1024ULL;
Just wondering, shouldn't you check whether the str had a valid value
[memparse (str, &next); next > str ..] and if it didn't, then use the
DEFAULT_VM_MAX_READAHEAD ? Otherwise, incase of a invalid
value, the readahead value will become zero.
> + default_backing_dev_info.ra_pages = vm_max_readahead_kb
> + * 1024 / PAGE_CACHE_SIZE;
> + return 0;
> +}
> +
> +early_param("readahead", readahead);
> +
-Ankit
--
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/