Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755752AbbLAIr6 (ORCPT ); Tue, 1 Dec 2015 03:47:58 -0500 Received: from casper.infradead.org ([85.118.1.10]:45705 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755651AbbLAIry (ORCPT ); Tue, 1 Dec 2015 03:47:54 -0500 Date: Tue, 1 Dec 2015 09:47:48 +0100 From: Peter Zijlstra To: Waiman Long Cc: Ingo Molnar , linux-kernel@vger.kernel.org, Scott J Norton , Douglas Hatch , Paul Turner , Ben Segall , Morten Rasmussen , Yuyang Du Subject: Re: [RFC PATCH 3/3] sched/fair: Use different cachelines for readers and writers of load_avg Message-ID: <20151201084748.GJ3816@twins.programming.kicks-ass.net> References: <1448478580-26467-1-git-send-email-Waiman.Long@hpe.com> <1448478580-26467-4-git-send-email-Waiman.Long@hpe.com> <20151130102240.GH17308@twins.programming.kicks-ass.net> <565C9FDC.9020603@hpe.com> <20151130222936.GF3816@twins.programming.kicks-ass.net> <565D1B63.3070908@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <565D1B63.3070908@hpe.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1202 Lines: 25 On Mon, Nov 30, 2015 at 11:00:35PM -0500, Waiman Long wrote: > I think the current kernel use power-of-2 kmemcaches to satisfy kalloc() > requests except when the size is less than or equal to 192 where there are > some non-power-of-2 kmemcaches available. Given that the task_group > structure is large enough with FAIR_GROUP_SCHED enabled, we shouldn't hit > the case that the allocated buffer is not cacheline aligned. Using out-of-object storage is allowed (none of the existing sl*b allocators do so iirc). That is, its perfectly valid for a sl*b allocator for 64 byte objects to allocate 72 bytes for each object and use the 'spare' 8 bytes for object tracking or whatnot. That would respect the minimum alignment guarantee of 8 bytes but not provide the 'expected' object size alignment you're assuming. Also, we have the proper interfaces to request the explicit alignment for a reason. So if you need the alignment for correctness, use those. -- 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/