Re: resend----[PATCH] Avoid high order memory allocating withkmalloc, when read large seq file

From: Andrew Morton
Date: Thu Jan 31 2013 - 16:27:16 EST


On Thu, 31 Jan 2013 14:11:32 +0800
xtu4 <xiaobing.tu@xxxxxxxxx> wrote:

> [SEQ_FILE] Avoid high order memory allocating with kmalloc
> when read large seq file

The patch is still horridly mangled by your email client.

The implementation cheerfully ignores my earlier comment: "The
conventional way of doing this is to attempt the kmalloc with
__GFP_NOWARN and if that failed, fall back to vmalloc()."

This code has existed for ten years and this is the first time anyone
has encountered this problem. Rather than mucking around with the
seq_file code to attempt to fix this, it would be better to fix the
calling code.
--
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/