Re: [PATCH] mm: use only per-device readahead limit

From: Linus Torvalds
Date: Fri Aug 21 2015 - 16:44:27 EST


On Fri, Aug 21, 2015 at 1:21 PM, Roman Gushchin <klamm@xxxxxxxxxxxxxx> wrote:
>
> It's just a raid driver. For instance, drivers/md/raid5.c:6898 .

Ok. That makes me a bit less nervous. I was worried there was some
admin program out there that just ups the readahead on peoples
devices, which would mean that ra_pages is some random value chosen by
crazy user space people.

> So, I like an idea to delegate the readahead limit calculation to the underlying i/o level.

Yeah, I'm not against it either. It's just that historically we've had
some issues with people over-doing readahead (because it often helps
some made-up microbenchmark), and then we end up with latency issues
when somebody does a multi-gigabyte readahead... Iirc, we had exactly
that problem with the readahead() system call at some point (long
ago).

But if it's just the default ra_pages, then that should be ok. I think
the kernel defaults are generally sane, and I hope there isn't some
crazy distro that ends up mucking with this.

Linus
--
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/