Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3199124pxb; Wed, 13 Oct 2021 00:40:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGZLMEL6EPI7R7Wu/XUwOtGToGa9eCPUDmhHPXvZ3PnlnivEIR6iSOJ0vdtcjnehaxt/xU X-Received: by 2002:a17:906:7091:: with SMTP id b17mr38454292ejk.395.1634110847548; Wed, 13 Oct 2021 00:40:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634110847; cv=none; d=google.com; s=arc-20160816; b=K+UmfIMkhCHWfc2jyXmyEUF58dvqhTe+Q3AajB2GVgKUj28akhhhfFOWSd+lot/vVj WyP0hxnU4vEDxo8kB6qMtjiBUyAJBicbLJM5M5wLm4QkMjhhvyOMacjTPerbdRWhTu89 uCWusmd7HmHphqXiOajZWOe5DBYjFKsLJHddnkP5kJMWdVQrDt749SLY/Lt1PAFNSIJL 6cR/B6zOqHKI/1O3CzohjPWaYpOKGGin+64OXTCT31DXm5GYS39OaeovtwSzSZUzI+jl iBA3ZFp+1bMdsRw2OoMko0easCPwKQpCQ9kXCnRg/t/WDqoOh2IodF+vcyoht2WBxw0D t+Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=m2/5m4EyNl7HialOD6IWobME8joFWhALPD0XeJqljVQ=; b=Nn6ktqQGjPfVZ6UIEZnn2IQGtUCUcRKDcxgszu51we+SKMVXHRW0TBanePoGxNjq2A 2vhbWg4ouPz3yh8BIqWQHfRpJymZF8BS5Ouko7LG3VVU6GnI9FOxKwcJmarfvxrFXN17 qXLFQJqyCffH/AScFJcnZsQHmNsB5jX5YxQ1sw/IsXmEnJ1bxbSrvcGwhvisFGD/WRc4 TT8vCsBV7+VcGmtAoORM0jvH14bfRVMLfWEVl6sGOaBvQiz+u/MDm6PVxaJmVcJhDu/n roTeIpxEZ4agLQu1UHjO23OZ/mtlSfpYVgkGwxQV3jmJG2vsMuYWrGTar/DDeqhhP+Xw sXyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="d/Y5iKa4"; 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 sb18si29226198ejc.767.2021.10.13.00.40.24; Wed, 13 Oct 2021 00:40:47 -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="d/Y5iKa4"; 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 S238575AbhJMHkh (ORCPT + 99 others); Wed, 13 Oct 2021 03:40:37 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:52548 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238565AbhJMHkg (ORCPT ); Wed, 13 Oct 2021 03:40:36 -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 B9FD9222C0; Wed, 13 Oct 2021 07:38:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1634110711; 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=m2/5m4EyNl7HialOD6IWobME8joFWhALPD0XeJqljVQ=; b=d/Y5iKa4s2ThoqvqoYb8etqWtevCqOBHYZ1DF1p+oWm4BNq5proRG8XQwacGegyAqB75Ek j8WQTrGXsr/qzoT8mGcjl1Hdzk1hMBiQZTncNkiAKcJfCIdLsoQj+f5aCOhretdrLKNNpA cIyKJdpDYlB65nkVFopzCYv4umGIE0Y= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1634110711; 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=m2/5m4EyNl7HialOD6IWobME8joFWhALPD0XeJqljVQ=; b=fbLc4QJpjAioNpDXuQMoQ2cfpcSZhuuFzmAs/0lsu085RIwJJatBvU7POTVHCmbF8Sk8BH TogvOXMpdLYrLMDw== 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 858EB13CBE; Wed, 13 Oct 2021 07:38:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +E26H/eMZmHgeAAAMHmgww (envelope-from ); Wed, 13 Oct 2021 07:38:31 +0000 Message-ID: <3928ef69-eaac-241c-eb32-d2dd2eab9384@suse.cz> Date: Wed, 13 Oct 2021 09:38:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH] xfs: use kmem_cache_free() for kmem_cache objects Content-Language: en-US To: "Darrick J. Wong" Cc: David Rientjes , Rustam Kovhaev , Dave Chinner , linux-xfs@vger.kernel.org, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, gregkh@linuxfoundation.org, Al Viro , dvyukov@google.com References: <20210929212347.1139666-1-rkovhaev@gmail.com> <20210930044202.GP2361455@dread.disaster.area> <17f537b3-e2eb-5d0a-1465-20f3d3c960e2@suse.cz> <1e0df91-556e-cee5-76f7-285d28fe31@google.com> <20211012204320.GP24307@magnolia> <20211012204345.GQ24307@magnolia> <9db5d16a-2999-07a4-c49d-7417601f834f@suse.cz> <20211012232255.GS24307@magnolia> From: Vlastimil Babka In-Reply-To: <20211012232255.GS24307@magnolia> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/13/21 01:22, Darrick J. Wong wrote: > On Tue, Oct 12, 2021 at 11:32:25PM +0200, Vlastimil Babka wrote: >> On 10/12/2021 10:43 PM, Darrick J. Wong wrote: >> > On Tue, Oct 12, 2021 at 01:43:20PM -0700, Darrick J. Wong wrote: >> >> On Sun, Oct 03, 2021 at 06:07:20PM -0700, David Rientjes wrote: >> >> >> >> I audited the entire xfs (kernel) codebase and didn't find any other >> >> usage errors. Thanks for the patch; I'll apply it to for-next. >> >> Which patch, the one that started this thread and uses kmem_cache_free() instead >> of kfree()? I thought we said it's not the best way? > > It's probably better to fix slob to be able to tell that a kmem_free'd > object actually belongs to a cache and should get freed that way, just > like its larger sl[ua]b cousins. Agreed. Rustam, do you still plan to do that? > However, even if that does come to pass, anybody /else/ who wants to > start(?) using XFS on a SLOB system will need this patch to fix the > minor papercut. Now that I've checked the rest of the codebase, I don't > find it reasonable to make XFS mutually exclusive with SLOB over two > instances of slab cache misuse. Hence the RVB. :) Ok. I was just wondering because Dave's first reply was that actually you'll need to expand the use of kfree() instead of kmem_cache_free().