Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3645580pxb; Wed, 13 Oct 2021 10:01:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzR8dV33Ytvv5V7/vMeuLMHhUBcyE8jk///B/dodz2ldZ6Qg2Xnc7B2W3Sy1bAR6NRTDe4f X-Received: by 2002:a17:90a:a60c:: with SMTP id c12mr15127971pjq.28.1634144475232; Wed, 13 Oct 2021 10:01:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634144475; cv=none; d=google.com; s=arc-20160816; b=1FkWHNXw0fif8/2sYOX1i1elxUmemOswzYBkkVqGa1EpdU4H6fGCZzTKbtwNIUUHBJ rExd9gc5Ayu45u60WakdcOmP9ZIR9lCebHxxjM2eVG1+c4MQKYFRA1NN0CnFU0utsJ+L N44UsNMM2bWHOXtOaeyvH7cvtvJkiAHZ8lAomdm8swZ8PlVICt0hibqwVw0HFgFguBi2 6GnmcQfxkMZV+0ndxGADEG89+QfdzEgkhGaE3/g6oy3iFXTJvf66Jph5GFh1NflxYaRq 1oMt6j0BExzmHnqm+yu2UXp34XMSDx5rFWNsQXdUBHVpJ8LIaey7HIIxGYl/rJsk5SrD Ojnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8cbGKp/2SKCzI/7d16DE4Ims0SpFBLwu8hl8mlZLlOo=; b=cXBfaZGN6d9kOzGwHXvOS/2GcIJ8IXrO1ACa80FTLKDC0FIaEkLJmLb9ngEzEffhh4 KF+FZcqc6MpdQKdzQLJJYcgn6LKOaKqMTTzEqpIe/dbGdacrdTrPg7sTy2MhNv/oDDdN WyNbOu9kYh0G5Wn1+SsRQmFIuWyvLDsWXjBv59U3o9QAPt8BZht187EizqXBkF5sghVi jbgAPuACDZkexGnxP/NRtcmohbWmOj297n5jq1Iw+Frd0r4B/3csedtbhXWUsolhiSs/ 8gVDyQS7bP3Hy8yYpe3zhqzC+Sa4iExzHwzyrqQtMkPE8D+Sbh2mUKKQsj3/6j4kF6PJ fy7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=oFOn0Tq6; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s10si6731287pji.114.2021.10.13.10.01.01; Wed, 13 Oct 2021 10:01:15 -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=@gmail.com header.s=20210112 header.b=oFOn0Tq6; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235869AbhJMQ7M (ORCPT + 99 others); Wed, 13 Oct 2021 12:59:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238191AbhJMQ6v (ORCPT ); Wed, 13 Oct 2021 12:58:51 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B89A7C06176F; Wed, 13 Oct 2021 09:56:43 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id ls14-20020a17090b350e00b001a00e2251c8so2738975pjb.4; Wed, 13 Oct 2021 09:56:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=8cbGKp/2SKCzI/7d16DE4Ims0SpFBLwu8hl8mlZLlOo=; b=oFOn0Tq6sOCCa7oR6RuKde4xQw/hwbwVhtwaptJIyoz2QA0GkZ9SKG3SAlsSoD+BMa gEVYT4q9hXHpebwTNziXfq1juVpttO+VHUMgvGPN4wfIIEFWO6Oshc+V0lsU2MEnKRwk gd6zgi2n9+xCksbFjiA2pyYJLXIYgmcK5Y87Fj/1PfYaFN8i1pnw8hLDQJCyPxu3cYqd jnm5ImJZzukIJcSrdtu0tw7QzD0ocFZ38OzE9YX6s9whTQ31snbu/eoH3Gfd8ShIGRnN 0//WyRX584GCgmRxwVTl8z6kqvkPzMFQaHq33lBjtLn9BlUwQGkfvv0zZ8Hvzb7voIds nwwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=8cbGKp/2SKCzI/7d16DE4Ims0SpFBLwu8hl8mlZLlOo=; b=c3OttgWwuiCVza8WbYrWmuOL6SDQ6ugJowdBcsyfZOd/8qI9GU0jIeKrsKuObMlYg6 3Dd3Q545+8zq+5GRX5fhB0fveT0aRW8uYgFMeNNqhqaGpyRvqPVCJrcszlXZprFip/0C hEeKuFBtCOFhg1eXvGcu2fBrO1DiQgmnLrK9KwfSHPkyQQMPRkid/qERzbF11j77uf4B YJFzK0RRPxRG74h741MkZiQeFIlBhYAHdlKJRSJuLd1ZAE5yySYZhNPa0oaO1yfaRSRY 0rOXXNCzLvWIRPUuidWHgmjUwyrNTDEkrVzctoGGO6cfkFcEHz4T9XTo47/WkQmKKKj/ 9cUw== X-Gm-Message-State: AOAM532EBuE/gGjjAGIHFvretA8UxctPI6agNVZR2mwGF0kWmN5JouP5 xzMc8MGuwWiwqO187lD0+Qg= X-Received: by 2002:a17:90b:17c9:: with SMTP id me9mr404934pjb.197.1634144203230; Wed, 13 Oct 2021 09:56:43 -0700 (PDT) Received: from nuc10 (d50-92-229-34.bchsia.telus.net. [50.92.229.34]) by smtp.gmail.com with ESMTPSA id x13sm84916pge.37.2021.10.13.09.56.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 09:56:42 -0700 (PDT) Date: Wed, 13 Oct 2021 09:56:41 -0700 From: Rustam Kovhaev To: Vlastimil Babka Cc: "Darrick J. Wong" , 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: References: <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> <3928ef69-eaac-241c-eb32-d2dd2eab9384@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3928ef69-eaac-241c-eb32-d2dd2eab9384@suse.cz> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > > > 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(). >