Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755700AbbHYOUG (ORCPT ); Tue, 25 Aug 2015 10:20:06 -0400 Received: from mail-la0-f41.google.com ([209.85.215.41]:34458 "EHLO mail-la0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751564AbbHYOUE (ORCPT ); Tue, 25 Aug 2015 10:20:04 -0400 From: Rasmus Villemoes To: Ingo Molnar Cc: George Spelvin , dave@sr71.net, linux-kernel@vger.kernel.org, linux-mm@kvack.org, peterz@infradead.org, riel@redhat.com, rientjes@google.com, torvalds@linux-foundation.org Subject: Re: [PATCH 3/3 v6] mm/vmalloc: Cache the vmalloc memory info Organization: D03 References: <20150824075018.GB20106@gmail.com> <20150824125402.28806.qmail@ns.horizon.com> <20150825095638.GA24750@gmail.com> X-Hashcash: 1:20:150825:linux-kernel@vger.kernel.org::TgXrknFwg3rWnv8Y:0000000000000000000000000000000000SGA X-Hashcash: 1:20:150825:linux@horizon.com::eQpD7QEBBUao5ayz:000000000000000000000000000000000000000000000cxV X-Hashcash: 1:20:150825:linux-mm@kvack.org::0CBgAngtbueFWNxx:00000000000000000000000000000000000000000000+sS X-Hashcash: 1:20:150825:torvalds@linux-foundation.org::y3rMukhXJQM79B07:000000000000000000000000000000001Cx1 X-Hashcash: 1:20:150825:mingo@kernel.org::Xzi9/vzQOSvF6/zN:02Cor X-Hashcash: 1:20:150825:dave@sr71.net::46u/xdAL9+senwcF:00002p6R X-Hashcash: 1:20:150825:rientjes@google.com::ADOtplNpL4NMzSis:0000000000000000000000000000000000000000004711 X-Hashcash: 1:20:150825:peterz@infradead.org::QZPXzItQlJhhzcAQ:000000000000000000000000000000000000000003r9J X-Hashcash: 1:20:150825:riel@redhat.com::tK49klVxHCNAWfPY:00DaVy Date: Tue, 25 Aug 2015 16:19:59 +0200 In-Reply-To: <20150825095638.GA24750@gmail.com> (Ingo Molnar's message of "Tue, 25 Aug 2015 11:56:38 +0200") Message-ID: <87io83wiuo.fsf@rasmusvillemoes.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1501 Lines: 37 On Tue, Aug 25 2015, Ingo Molnar wrote: > * George Spelvin wrote: > >> (I hope I'm not annoying you by bikeshedding this too much, although I >> think this is improving.) > > [ I don't mind, although I wish other, more critical parts of the kernel got this > much attention as well ;-) ] > Since we're beating dead horses, let me point out one possibly unintentional side-effect of initializing just one of vmap_info{,_cache}_gen: $ nm -n vmlinux | grep -E 'vmap_info(_cache)?_gen' ffffffff81e4e5e0 d vmap_info_gen ffffffff820d5700 b vmap_info_cache_gen [Up-thread, you wrote "I also moved the function-static cache next to the flag and seqlock - this should further compress the cache footprint."] One should probably ensure that they end up in the same cacheline if one wants the fast-path to be as fast as possible - the easiest way to ensure that is to put them in a small struct, and that might as well contain the spinlock and the cache itself as well. It's been fun seeing this evolve, but overall, I tend to agree with Peter: It's a lot of complexity for little gain. If we're not going to just kill the Vmalloc* fields (which is probably too controversial) I'd prefer Linus' simpler version. Rasmus -- 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/