Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754996AbaBUVYf (ORCPT ); Fri, 21 Feb 2014 16:24:35 -0500 Received: from mail-vc0-f171.google.com ([209.85.220.171]:63267 "EHLO mail-vc0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752771AbaBUVYe (ORCPT ); Fri, 21 Feb 2014 16:24:34 -0500 MIME-Version: 1.0 In-Reply-To: <1393016226.3039.44.camel@buesod1.americas.hpqcorp.net> References: <1392960523.3039.16.camel@buesod1.americas.hpqcorp.net> <1393016226.3039.44.camel@buesod1.americas.hpqcorp.net> Date: Fri, 21 Feb 2014 13:24:33 -0800 X-Google-Sender-Auth: pXKukTaVjvPIdSbqlvlnvdhyEKk Message-ID: Subject: Re: [PATCH] mm: per-thread vma caching From: Linus Torvalds To: Davidlohr Bueso Cc: Andrew Morton , Ingo Molnar , Peter Zijlstra , Michel Lespinasse , Mel Gorman , Rik van Riel , KOSAKI Motohiro , "Chandramouleeswaran, Aswin" , "Norton, Scott J" , linux-mm , Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 21, 2014 at 12:57 PM, Davidlohr Bueso wrote: > > Btw, one concern I had is regarding seqnum overflows... if such > scenarios should happen we'd end up potentially returning bogus vmas and > getting bus errors and other sorts of issues. So we'd have to flush the > caches, but, do we care? I guess on 32bit systems it could be a bit more > possible to trigger given enough forking. I guess we should do something like if (unlikely(!++seqnum)) flush_vma_cache() just to not have to worry about it. And we can either use a "#ifndef CONFIG_64BIT" to disable it for the 64-bit case (because no, we really don't need to worry about overflow in 64 bits ;), or just decide that a 32-bit sequence number actually packs better in the structures, and make it be an "u32" even on 64-bit architectures? It looks like a 32-bit sequence number might pack nicely next to the unsigned brk_randomized:1; but I didn't actually go and look at the context there to see what else is there.. Linus -- 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/