Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp780398pxb; Thu, 30 Sep 2021 17:42:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPC6NVN7f2ghJQSrgV+cNmvBuNtgXK3cQmunh650TVZFYFB1c274eW/NeEKDb7Fg6tYue4 X-Received: by 2002:a17:906:ce2c:: with SMTP id sd12mr2171456ejb.488.1633048925178; Thu, 30 Sep 2021 17:42:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633048925; cv=none; d=google.com; s=arc-20160816; b=GyzatH8h6ZfBA6pETZg4mjx7dhU4nrCqRIwXh8dzPS4zeElg6k573OBmrHdFN+ha3g oE7An7FZOwZ8Ut/VI3lfxngfa8TJLyIxHlY/wvcZC9M8zt0Ioki0xjhWzA0TTZ9I+jYj y8AahHnKjmjMtKWSpa1RWTjlbfSn4mPvC1YQkuwPRv6+rsvsxi5eT+3VVYy/S3DHIU/i DH0yYB1GmRDYbae7ROf1vELT15qhn657MU/vF0pq5fojtRw/ctaM5LsDdB1gv1uRMA9E 7b8j9pY7u/+uy8TlzQIxNmAMWcsgG9XE8uU8ThWaPWKyzdyfb/caqNF8Dx66xXqClAOt tpwA== 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=vRDg5mQIB7ZkRlTt9NHHXUKd/NnUUj/ZwFb8QTzm2pI=; b=bKK/ssOV0CuxTW+IZGlHp2hzlnivSibUuUjvzPcrQ1jPnuaUCdJl30HDgDWNkYWU6n 1Rw3Y1o0GhuZNl60av/mcvM0mDOSqeu3rP1QKTzqeBVuVdPgYe7SA62s15DT/nQArYfo MpB3dO775d9JGGWBdR55iEWA68nOXrDQSFI1ahYORRMTSuM+lS0Yk8KUMQHjZpQhF9xY pLGJlzU7Guk4SdZCjklkWv8QZrWEBFUeP2JZHnZuolmm+rvo7TXnWQA92KW4sbzNzKAF RilGZFmFIpgRsDNNYzhCBpmxMh6CxgNcFh44uceOMVFiNRJFm4oiCAj01Lchvror1FQS /JsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bVJ8x1hl; 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 bx16si5264823ejb.146.2021.09.30.17.41.40; Thu, 30 Sep 2021 17:42:05 -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=bVJ8x1hl; 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 S1351171AbhJAAeK (ORCPT + 99 others); Thu, 30 Sep 2021 20:34:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230172AbhJAAeJ (ORCPT ); Thu, 30 Sep 2021 20:34:09 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53E99C06176A; Thu, 30 Sep 2021 17:32:26 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id p1so394679pfh.8; Thu, 30 Sep 2021 17:32:26 -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=vRDg5mQIB7ZkRlTt9NHHXUKd/NnUUj/ZwFb8QTzm2pI=; b=bVJ8x1hle3yHhKqyWoKwJ3VcAW/gT80m7vhzFvyOjM8fckvgo7EtgtoXYh0LYECRtx x9HYLQ2ypdrc2jiZGQCWTygaz8irpkRTEFgFMyOV/4PUjl4/P7apjH9XwD/BMMeomWqo gvrki6VUbm/aRILs1MHssWnNcb+XyUXysP0kL05mCwHg65etyITmdfsHsqpySQXpPEpV r4w9VV14xID2uMAjB779Yqkl3DL5IVMKANlED6FAlerFy6Nt+jhf/3oj/vSDACjf5BW6 dI1lAWiIjo15hBZJAsJ0HJj/Ak8zDDbiWDC1qf809rch1+n38MNBw0uLWCm6eQJ1QfLs QprQ== 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=vRDg5mQIB7ZkRlTt9NHHXUKd/NnUUj/ZwFb8QTzm2pI=; b=q0AoGmbtvBDQTLhZW+OQgI3wtHbYMd2n6eKQE56D12zV3rtkPiSJPJP5TvQMn4Nky3 Tod5EV2Dy6nivFKTgXzC2T8177WBaEcMQXcqDxUNCKoJiweegsGQnnFMRBzhyyzYhFlK PjlZ4lsmMEEPgpIYpr+lr8dsolkpEw8pZzfZkPrC+34tGld+fpTp32FLS+5c/WInsCGE Hk9BAMrIx4dnNL1lwrXALlIsqcKCmmocOlqlwgtTaWazmT+btr/vMQ35a+frUHLIGJb0 sfNf/IcY45uZBJL6bElhu2zoTG0Qy0iKPaiKyKWusCOI4Ws3hFAj9hQPUzgtshJV2lmG HHcA== X-Gm-Message-State: AOAM533a8cH8gdJBRFmgsvz1VOluNhTTW2d5HGFZ4AmPncDPZ73X+tU2 I6M5s2s1zFz23xUf9fyWt0Y= X-Received: by 2002:a65:6554:: with SMTP id a20mr7313562pgw.107.1633048345725; Thu, 30 Sep 2021 17:32:25 -0700 (PDT) Received: from nuc10 (d50-92-229-34.bchsia.telus.net. [50.92.229.34]) by smtp.gmail.com with ESMTPSA id b142sm4271980pfb.17.2021.09.30.17.32.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 17:32:25 -0700 (PDT) Date: Thu, 30 Sep 2021 17:32:23 -0700 From: Rustam Kovhaev To: Vlastimil Babka , Dave Chinner Cc: 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 , dvyukov@google.com Subject: Re: [PATCH] xfs: use kmem_cache_free() for kmem_cache objects Message-ID: References: <20210929212347.1139666-1-rkovhaev@gmail.com> <20210930044202.GP2361455@dread.disaster.area> <17f537b3-e2eb-5d0a-1465-20f3d3c960e2@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 30, 2021 at 11:10:10PM +0200, Vlastimil Babka wrote: > 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. OK, so we consider XFS on SLOB a supported configuration that might be used and should be tested. I'll look into maybe adding a config with CONFIG_SLOB and CONFIG_XFS_FS to syzbot. It seems that we need to patch SLOB anyway, because any other code can hit the very same issue. > >> 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). OK.