Re: [RFC PATCH 4/6] mm: vm_unmapped_area() lookup function
From: Rik van Riel <hidden>
Date: 2012-11-03 00:41:01
On 11/02/2012 06:41 PM, Michel Lespinasse wrote:
On Fri, Nov 2, 2012 at 9:52 AM, Rik van Riel [off-list ref] wrote:quoted
On 10/31/2012 06:33 AM, Michel Lespinasse wrote:
I guess the suggestion is OK in the sense that I can't see a case where it'd hurt. However, it still won't find all cases where we just unmapped a region of size N with the correct alignment - it could be that the first region we find has insufficient alignment, and then the search with an increased length could fail, even though there exists an aligned gap (just not the first) of the desired size. So, this is only a partial solution.
Unfortunately, I don't think there is an efficient solution to the general problem, and the partial solutions discussed above (both yours and mine) don't seem to cover enough cases to warrant the complexity IMO...
The common case (anonymous memory) is that no alignment is required, so your solution and mine would be equivalent :) You are right that your solution and mine are pretty much the same for the (rarer) cases where alignment is needed. Lets stick with your simpler version. ACK to your version -- All rights reversed -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>