Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp569438ybh; Wed, 18 Mar 2020 05:16:13 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtP3IYz+jmZUHK3WtsXoSJUE9Bg5hNe1eSOziQAb5APYW0SXdJ1OhkMz0bfTdFnEJBEnZVJ X-Received: by 2002:a9d:6654:: with SMTP id q20mr3703039otm.180.1584533772911; Wed, 18 Mar 2020 05:16:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584533772; cv=none; d=google.com; s=arc-20160816; b=SfDYmeB4YbI7mD1vuRxg/n6PNoRMhz17GvZqg2yqaGKfQD1+qLGS5Vz1VPh7ehBA8r PtauD2XGS0+4EMa9uzOiNXoYbhk4w9QYrG+95ew94Vc/2o2Lt+ePv5PTj7+T7Li40wHp nTKtfkewB8I1PiO1yxrOiM3dbvs5zIiQVhUmY14fKo/sr9FzpvI/w0550k5pKN7IpRCs Hyo5i50q+eCEPaj3Cmme+xPvgKOKNjaP0DYtSzMT4jwn0lVUyNJ+RbFoUu5tWu62DaF1 DdwZvVIessdG3aGSiEChDmtTLXQwu6dmZQokFB7D+cv5jxGV61hZAN/I1o/u1+0u1qAP DViw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=og0LDHDGJi+jmOmmQp4Rk2H6PUrLgVc6fcIsRCRNLD0=; b=Jy0JE67MYXjAeTVgQo1rC4ins3LHk2iJQ8dXhXcyq+vPIt8O7lngR/bUaro2cpxKL0 uE7jA3UztWprWOQaIifa28CcU18rkJ3DHwVbfs4OAux7zBjg1J04ZoAXpOK/Mpt8QneY GjSWWHugroTjuhspbI71Jg66/I+NRL/tTrLFd6Ur/uU0tDSORTgSXFuujQIQQoq7cBDb zeb+8kbAGhpg98exzNrb8PI/BgdS1927H8XRc4vRpm0YjXw7mXF1GkIrhLedu1oKt5FG gvm7sUa4bdBCpMHjmcCsTu69ou/LKkusto52NPgt+IOGF7D9WuG5/y2Rcnht4uY5Mw1u 43FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iAeIBdla; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id z16si4054537otj.5.2020.03.18.05.16.00; Wed, 18 Mar 2020 05:16:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iAeIBdla; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726789AbgCRMOR (ORCPT + 99 others); Wed, 18 Mar 2020 08:14:17 -0400 Received: from mail-vk1-f196.google.com ([209.85.221.196]:41421 "EHLO mail-vk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726631AbgCRMOR (ORCPT ); Wed, 18 Mar 2020 08:14:17 -0400 Received: by mail-vk1-f196.google.com with SMTP id q8so7001690vka.8 for ; Wed, 18 Mar 2020 05:14:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=og0LDHDGJi+jmOmmQp4Rk2H6PUrLgVc6fcIsRCRNLD0=; b=iAeIBdlaaFvGcjmOV9nnbG4Q+ZKQ58q6k1c/nmRUOMcJSdQdGoeupdtrE0kMoc4lpt tEZueJQn3kCsdxcxN9odshFTtplAHptMXbyeDvQnnTC6abmb/DbaTG/Gjk/rjKhu34XH F2ITAgNyF83lzIz/61qEASXmvPCKRW+M9iJ+PbaFQzhZAIZB3yw8fhmgkCI09aEuas4p npdO3N3Ju7my6YLRjznwctZm7KlW4PbyQN6a5kYxyGYntxrnLPxGzzpswV6X9ffChNMZ S4QnHDcw9NCHeG0/8rpOn7HeDWK04qk/2DZsOqiKAaNE6IF1N8/U/0XYPUt7g3do7k6m eh5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=og0LDHDGJi+jmOmmQp4Rk2H6PUrLgVc6fcIsRCRNLD0=; b=CTpluNu3EOAFkoNgiePRpoNzLnuVdawsPL/4aUnvuC8Omw1DbswvRYbXBZX0RhpVsA 8Iph1WEheF4ac/wCvAajKM833SnOkyXF9wAAEI6+bGdQalI2eoqi+ja5Gr1UvnSokSbu we2N5QwWra2j7iQKkDSc41VhL2Avqg9AFCVcQ8NgRIomq32gJfiuYF6nU/HTK5xKZvby zl0iVrB3C3+MPGQJq/l+gEFNlfexRjXt8qrT8VndABAH+d7KCMsNtwPXcgIUeKeiTqWI ebxz/Np3CD3iTtU8V8ti9v52V0Un7HdKaib+gzdjYNaB+mFt3NSN6RAgCUC0Z2iEIGWB MqLQ== X-Gm-Message-State: ANhLgQ1IzsQyAt8XhfSe8yEn+wS+TcX+oA6smfHf7WLMcYC53wYRdN3u BpFzD7fvOJyf5VcyD0LumLX0a0ChNTm3TPKEylWK8/KwWR4= X-Received: by 2002:a1f:ee05:: with SMTP id m5mr3020614vkh.9.1584533656113; Wed, 18 Mar 2020 05:14:16 -0700 (PDT) MIME-Version: 1.0 References: <20200225101710.40123-1-yuchao0@huawei.com> In-Reply-To: <20200225101710.40123-1-yuchao0@huawei.com> From: Ju Hyung Park Date: Wed, 18 Mar 2020 21:14:04 +0900 Message-ID: Subject: Re: [PATCH v2] f2fs: use kmem_cache pool during inline xattr lookups To: Chao Yu Cc: Jaegeuk Kim , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Chao Yu Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Chao. I got the time around to test this patch. The v2 patch seems to work just fine, and the code looks good. On Tue, Feb 25, 2020 at 7:17 PM Chao Yu wrote: > diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c > index a3360a97e624..e46a10eb0e42 100644 > --- a/fs/f2fs/xattr.c > +++ b/fs/f2fs/xattr.c > @@ -23,6 +23,25 @@ > #include "xattr.h" > #include "segment.h" > > +static void *xattr_alloc(struct f2fs_sb_info *sbi, int size, bool *is_inline) > +{ > + *is_inline = (size == sbi->inline_xattr_slab_size); Would it be meaningless to change this to the following code? if (likely(size == sbi->inline_xattr_slab_size)) *is_inline = true; else *is_inline = false; The above statement seems to be only false during the initial mount and the rest(millions) seems to be always true. Thanks.