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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DD6CC433F5 for ; Fri, 15 Oct 2021 00:57:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 229D9610FF for ; Fri, 15 Oct 2021 00:57:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 229D9610FF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 9B51C6B006C; Thu, 14 Oct 2021 20:57:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9669F6B0071; Thu, 14 Oct 2021 20:57:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 82DC7900002; Thu, 14 Oct 2021 20:57:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0073.hostedemail.com [216.40.44.73]) by kanga.kvack.org (Postfix) with ESMTP id 758BD6B006C for ; Thu, 14 Oct 2021 20:57:31 -0400 (EDT) Received: from smtpin40.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 34BF3183F91DC for ; Fri, 15 Oct 2021 00:57:31 +0000 (UTC) X-FDA: 78696858702.40.EAFD703 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf23.hostedemail.com (Postfix) with ESMTP id EB44890000A5 for ; Fri, 15 Oct 2021 00:57:28 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id C6E8461040; Fri, 15 Oct 2021 00:57:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634259449; bh=WFqaaGetsrU0F1LXNipYaIrryMD5ZYTRfecIsz8rLq8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=snUtZ9excOZNnlFFMRUeJVIxjWJFru1Xvrjr8xypife31DULY3UMsHv/mzQYLm0MG c9DxNx3iz2b741uRBsnAMYRZ+n1uDj8mCPhiw5S4bGh+diRuhvtguhDaKgMyzVNPZJ JMqzlqoOm0y4OKUSb6bYHxmoZL/bAftajHT41L60WYI5G2r0aIP/0RT10ferHe+p3u fFaj0Te7y9rhfifV+KsydswLpAWBKsvPSTk4yFR929qVA6SrgPJ06LFpK9R2i6QtXE 39BAhklqvLUNInES41D5KZmnAg0pRVkCWRpIrusVtvG31ZOFmiyzB57FODAtapjC4w k1qCMqgGYq9Tg== Date: Thu, 14 Oct 2021 17:57:29 -0700 From: "Darrick J. Wong" To: Rustam Kovhaev Cc: Vlastimil Babka , David Rientjes , 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 Subject: Re: [PATCH] xfs: use kmem_cache_free() for kmem_cache objects Message-ID: <20211015005729.GD24333@magnolia> References: <1e0df91-556e-cee5-76f7-285d28fe31@google.com> <20211012204320.GP24307@magnolia> <20211012204345.GQ24307@magnolia> <9db5d16a-2999-07a4-c49d-7417601f834f@suse.cz> <20211012232255.GS24307@magnolia> <3928ef69-eaac-241c-eb32-d2dd2eab9384@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: EB44890000A5 X-Stat-Signature: pe6j7unds3ukntmfpeamigces9c4wbnx Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=snUtZ9ex; spf=pass (imf23.hostedemail.com: domain of djwong@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=djwong@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-HE-Tag: 1634259448-492049 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 Wed, Oct 13, 2021 at 09:56:41AM -0700, Rustam Kovhaev wrote: > On Wed, Oct 13, 2021 at 09:38:31AM +0200, Vlastimil Babka wrote: > > 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? > > Yes, I do, thank you. Note that I left out the parts of the patch that changed mm/slob.c because I didn't think that was appropriate for a patch titled 'xfs:'. > > > > > > 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(). I look forward to doing this, but since XFS is a downstream consumer of the kmem apis, we'll have to wait until the slob changes land to do that. --D