From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx125.postini.com [74.125.245.125]) by kanga.kvack.org (Postfix) with SMTP id 487B96B0044 for ; Fri, 2 Nov 2012 20:41:01 -0400 (EDT) Message-ID: <50946810.7010308@redhat.com> Date: Fri, 02 Nov 2012 20:40:48 -0400 From: Rik van Riel MIME-Version: 1.0 Subject: Re: [RFC PATCH 4/6] mm: vm_unmapped_area() lookup function References: <1351679605-4816-1-git-send-email-walken@google.com> <1351679605-4816-5-git-send-email-walken@google.com> <5093FA42.50806@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Michel Lespinasse Cc: Hugh Dickins , Mel Gorman , Peter Zijlstra , Johannes Weiner , Andrea Arcangeli , linux-mm@kvack.org On 11/02/2012 06:41 PM, Michel Lespinasse wrote: > On Fri, Nov 2, 2012 at 9:52 AM, Rik van Riel wrote: >> 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: email@kvack.org