Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp671976pxb; Thu, 30 Sep 2021 14:39:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywch1cO1RIn6IIjdls40uIjOO2vcEoadx/1j29eTUDg/XIfK/SEZvWm0xL6qUDOAtHeLRG X-Received: by 2002:a17:906:cc4a:: with SMTP id mm10mr1856656ejb.384.1633037966361; Thu, 30 Sep 2021 14:39:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633037966; cv=none; d=google.com; s=arc-20160816; b=KN9KZsoU7K5NcZmeZMowMIQ5+7ormoCbuza5ew0XK4cUBzKsYR5QMLTWzUBxgNnkpf jxZL3iQDXpzGUMJ8MX4rXnJ8rWZ12Yc581d79Dgm93WwRSemz/BxtnyFicAFB5iqQHE8 SPDpoPZDSa6nsU5kIbqohI61TYj56KWunRYJdMo5EWjxO/WnLAyq0zMT6Fuvc+zBwasY nQZp3bxoJ3nEQG6qNSJIiRTjwnLu061VYeOMOp8F87c9XcZRJp5qUHSyDovgah4t8yWK 9t2rpHGUrAzOdlXK+mxoSk6Sjr2INlWp9mYa7rZ3vr/+6JtZYZ3Cky4Z5vBrh9qfgXRa tDQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-signature; bh=hF1+AiAkOiwxS7GYNWFY7mrQc9otq7zFJhOd9XeK0UI=; b=YHrbEikgsRLL3GJt1oFcNP05cp6B4uHz4DMXcynMh6WDzgH7pPNaK8Z48Mg+qwdpsw G4Lgx2oBYkWqWzWdpG66ALzq4HHMXNptySZ0ZPWRHj+bSRWna94tvLX59TIXOgA+4IVQ dcbI4mxvHgGzWXnXfeNTP5HXx1TrqeEoPkYYl6cSqSddV0LPXkLycO6sbnZwGHJODxv0 B0H9X8bI7QXWaSJ+yta1hzbFD5evK54vDufdz8FhuG6yY08yPBK1gRDDUuYRoYl9cWMj 7HwuXimsThHA++AWgbWdnBCKPqGuOH0FsDU4oQGKiwMSWPhOrybjPI9eJM3KojEc/Gk4 scfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=sIdcON51; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 16si4869198ejd.683.2021.09.30.14.39.01; Thu, 30 Sep 2021 14:39:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=sIdcON51; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348755AbhI3VMp (ORCPT + 99 others); Thu, 30 Sep 2021 17:12:45 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:55648 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348668AbhI3VMn (ORCPT ); Thu, 30 Sep 2021 17:12:43 -0400 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 23B4B225F5; Thu, 30 Sep 2021 21:10:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1633036259; 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=hF1+AiAkOiwxS7GYNWFY7mrQc9otq7zFJhOd9XeK0UI=; b=sIdcON51m/C0XKXzQk94plviKDHXpAnnHT2MTXjurEoYOi3l+ppLUiESWHP63ASv+Drjhv GZDnNsiRgqttory5uKonjDBv2FEJTtxtvF0CeXxoJDeGq4cjgT7Kt2B3PIYKKwTixYWill 6OaecVNdNO/PCqC1rANe2oxeWcK3P7k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1633036259; 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=hF1+AiAkOiwxS7GYNWFY7mrQc9otq7zFJhOd9XeK0UI=; b=txE+MXYPMA8AKS3I5AOUXdzpLNFIZVkV8Yl9tZVtKfYJYsNd5lPsGBiORDVTGxhL+GM/I1 PseKpwG+r+56bJCg== 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 E2F7713B63; Thu, 30 Sep 2021 21:10:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 6nSdNuInVmFPQwAAMHmgww (envelope-from ); Thu, 30 Sep 2021 21:10:58 +0000 Subject: Re: [PATCH] xfs: use kmem_cache_free() for kmem_cache objects To: Rustam Kovhaev Cc: Dave Chinner , djwong@kernel.org, linux-xfs@vger.kernel.org, cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, gregkh@linuxfoundation.org, Al Viro References: <20210929212347.1139666-1-rkovhaev@gmail.com> <20210930044202.GP2361455@dread.disaster.area> <17f537b3-e2eb-5d0a-1465-20f3d3c960e2@suse.cz> From: Vlastimil Babka Message-ID: Date: Thu, 30 Sep 2021 23:10:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/30/21 8:48 PM, Rustam Kovhaev wrote: > On Thu, Sep 30, 2021 at 10:13:40AM +0200, Vlastimil Babka wrote: >> >> I think it's fair if something like XFS (not meant for tiny systems AFAIK?) >> excludes SLOB (meant for tiny systems). Clearly nobody tried to use these >> two together last 5 years anyway. > > +1 for adding Kconfig option, it seems like some things are not meant to > be together. But if we patch SLOB, we won't need it. >> Maybe we could also just add the 4 bytes to all SLOB objects, declare >> kfree() is always fine and be done with it. Yes, it will make SLOB footprint >> somewhat less tiny, but even whan we added kmalloc power of two alignment >> guarantees, the impact on SLOB was negligible. > > I'll send a patch to add a 4-byte header for kmem_cache_alloc() > allocations. Thanks. Please report in the changelog slab usage from /proc/meminfo before and after patch (at least a snapshot after a full boot). >>> Thoughts? >>> >>> Cheers, >>> >>> Dave. >>> >>