Messages in this thread | | | Subject | Re: [PATCH] MTD: Retry Read/Write Transfer Buffer Allocations | From | Artem Bityutskiy <> | Date | Mon, 04 Apr 2011 10:41:50 +0300 |
| |
On Mon, 2011-04-04 at 10:27 +0300, Artem Bityutskiy wrote: > An third, as I wrote in my answer to Jarkko, allocating large contiguous > buffers is bad for performance: if the system memory is fragmented and > there is no such large contiguous areas, the kernel will start writing > back dirty FS data, killing FS caches, shrinking caches and buggers, > probably even swapping out applications. We do not want MTD to cause > this at all.
s/buggers/buffers/
> Probably we can mitigate this with kmalloc flags. Now, I'm not sure what > flags are the optimal, but I'd do: > > __GFP_NOWARN | __GFP_WAIT | __GFP_NORETRY
Of course I meant you should use special flags as long as you are allocating more than 1 contiguous page. But the last PAGE_SIZE allocation should be done with standard GFP_KERNEL flag.
-- Best Regards, Artem Bityutskiy (Артём Битюцкий)
-- 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/
| |