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 C057CC433FE for ; Fri, 1 Oct 2021 00:32:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5FBD061390 for ; Fri, 1 Oct 2021 00:32:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5FBD061390 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id A578D9400EB; Thu, 30 Sep 2021 20:32:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A062C9400E4; Thu, 30 Sep 2021 20:32:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8F4FE9400EB; Thu, 30 Sep 2021 20:32:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0185.hostedemail.com [216.40.44.185]) by kanga.kvack.org (Postfix) with ESMTP id 820739400E4 for ; Thu, 30 Sep 2021 20:32:27 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 2EBE2184548A9 for ; Fri, 1 Oct 2021 00:32:27 +0000 (UTC) X-FDA: 78645992334.04.CBAC743 Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by imf04.hostedemail.com (Postfix) with ESMTP id EB707500033E for ; Fri, 1 Oct 2021 00:32:26 +0000 (UTC) Received: by mail-pg1-f174.google.com with SMTP id e7so7886951pgk.2 for ; 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=pj28mNh54UaaOmryXbGBXOlt8ABhZ5Kdkau03hAWQH4tkaqIHzMvISE7cQ1hug4LOi qMqsCUxHhRTjAXSLfV32cBQGKaLj77z7BxDLFAcDxVBpYbAXtSKhsbp397QN6egi5R5x z+8FBRanWQGq1sKpGrAffTjhI9gvrevtWIkkMbU4WfeXhwEmQZoT76pw9pg9SbGMln/N kiPzuX5trg2W2A9RSKyndtri3hm5nR44h/ggP1Nmxkgyuh7P6CAu9/ncs3IczAwcgiZb C+hCFXD8BELYfknpHpgUD/famrMgLYt1ZN1LjsUE8A+4T662w5FXE0Wniw7Bj7vAhnR+ 8HFA== X-Gm-Message-State: AOAM533+687imXeEvTFNzNPh54iool2LJVXAHyRZOcA2XHHH4OYP7p8e qAvC8V/gHjjr1MXMFQSByp4= X-Google-Smtp-Source: ABdhPJxM3nEsrkN+aXCGrXCmJM/MXQAksNTANwWDDOf+rFJW7wsqTSUAkUT9ZtASzSq2NXweULIYlA== 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: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: EB707500033E X-Stat-Signature: 4o4s3k4b3315975uxjhyx3maksmu8z6m Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=bVJ8x1hl; spf=pass (imf04.hostedemail.com: domain of rkovhaev@gmail.com designates 209.85.215.174 as permitted sender) smtp.mailfrom=rkovhaev@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-HE-Tag: 1633048346-55305 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 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.