From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06817C433EF for ; Mon, 22 Nov 2021 11:50:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8AE3C6B0071; Mon, 22 Nov 2021 06:49:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 85DBB6B0072; Mon, 22 Nov 2021 06:49:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 727496B0073; Mon, 22 Nov 2021 06:49:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0040.hostedemail.com [216.40.44.40]) by kanga.kvack.org (Postfix) with ESMTP id 64E0B6B0071 for ; Mon, 22 Nov 2021 06:49:48 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 2174F181FC554 for ; Mon, 22 Nov 2021 11:49:38 +0000 (UTC) X-FDA: 78836396142.19.AFA3E5A Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf24.hostedemail.com (Postfix) with ESMTP id C9350B0000B2 for ; Mon, 22 Nov 2021 11:49:34 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 2CC7F218E0; Mon, 22 Nov 2021 11:49:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1637581776; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ObHlJX+R6cBz3I2hvhUPz/10AQi87lwvc2sZDEvI3VE=; b=pC9h4uErDeLn+eKrpMVExMKYRS39+xv65yzVI0iF7At5cqM0LBbBjmc3TkJG0MuTFUTrVy JBQWvJ9EIO85wp4lDe/f0O+z5hc1wSLKYhhzdKvGu3pO0xNMw3fWYrhLwM6cJmBAZpbVsC 558EbchJHhDTZXob1EVLvW4bDhYKbfU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1637581776; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ObHlJX+R6cBz3I2hvhUPz/10AQi87lwvc2sZDEvI3VE=; b=tvZlQKUCgDN60iH/W7LwC9S8/MnG7+/Kkg2Irtpv8pgupjX06mgyYD1iIACxWqO16abNyi cwZ3bFJiboMpjICQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id EC0A313B90; Mon, 22 Nov 2021 11:49:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id X4IROc+Dm2HzIwAAMHmgww (envelope-from ); Mon, 22 Nov 2021 11:49:35 +0000 Message-ID: <56c0671c-6db2-05ac-66a0-6f24101e6c5a@suse.cz> Date: Mon, 22 Nov 2021 12:49:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Content-Language: en-US To: Christoph Lameter Cc: Rustam Kovhaev , penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, corbet@lwn.net, djwong@kernel.org, david@fromorbit.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-doc@vger.kernel.org, gregkh@linuxfoundation.org, viro@zeniv.linux.org.uk, dvyukov@google.com References: <037227db-c869-7d9c-65e8-8f5f8682171d@suse.cz> <20211122013026.909933-1-rkovhaev@gmail.com> <3c996e22-034f-1013-3978-1f786aae38fb@suse.cz> <148d2774-77b9-bb25-c132-80b00e16ea06@suse.cz> From: Vlastimil Babka Subject: Re: [PATCH v4] slob: add size header to all allocations In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: C9350B0000B2 X-Stat-Signature: 51s9modzjr4573spza5qrc8348ai1i3f Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=pC9h4uEr; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=tvZlQKUC; spf=pass (imf24.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.28 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none X-HE-Tag: 1637581774-148700 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 11/22/21 12:40, Christoph Lameter wrote: > On Mon, 22 Nov 2021, Vlastimil Babka wrote: > >> It's no problem to have the real beginning of the object aligned, and the >> prepended header not. The code already does that before this patch for the >> kmalloc power-of-two alignments, where e.g. the object can be aligned to 256 >> bytes, but the prepended header to a smaller ARCH_KMALLOC_MINALIGN / >> ARCH_SLAB_MINALIGN. > > Ok but then the first object in a page may still have those issues. Hmm, that's right. I guess we should also distinguish ARCH_KMALLOC_MINALIGN for kmalloc paths, and ARCH_SLAB_MINALIGN for kmem_cache_alloc paths. Seems the latter is generally smaller, thus some holes left by kmalloc allocations could be filled later by kmem_cache_alloc allocations. > >> > I dont know but it seems that making slob that sophisticated is counter >> > productive. Remove SLOB? >> >> I wouldn't mind, but somebody might :) > > Well run a space efficiency analysis after this patch. If the memory used > is larger than SLUB (with the configuration for minimal data footprint) > then there is no reason for SLOB to continue. Makes sense.