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 X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C593BC432C0 for ; Thu, 21 Nov 2019 04:31:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 52FD4206CC for ; Thu, 21 Nov 2019 04:31:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52FD4206CC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=zeniv.linux.org.uk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D0B496B02A6; Wed, 20 Nov 2019 23:31:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CBADE6B02A8; Wed, 20 Nov 2019 23:31:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C1E6C6B02A9; Wed, 20 Nov 2019 23:31:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0080.hostedemail.com [216.40.44.80]) by kanga.kvack.org (Postfix) with ESMTP id AE1676B02A6 for ; Wed, 20 Nov 2019 23:31:48 -0500 (EST) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id 85C8952B0 for ; Thu, 21 Nov 2019 04:31:48 +0000 (UTC) X-FDA: 76179011496.04.pest72_670a13a7e534d X-HE-Tag: pest72_670a13a7e534d X-Filterd-Recvd-Size: 2294 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [195.92.253.2]) by imf17.hostedemail.com (Postfix) with ESMTP for ; Thu, 21 Nov 2019 04:31:47 +0000 (UTC) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iXe7r-00086k-TL; Thu, 21 Nov 2019 04:31:28 +0000 Date: Thu, 21 Nov 2019 04:31:27 +0000 From: Al Viro To: Matthew Wilcox Cc: zhengbin , hughd@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, houtao1@huawei.com, yi.zhang@huawei.com Subject: Re: [PATCH] tmpfs: use ida to get inode number Message-ID: <20191121043127.GA26530@ZenIV.linux.org.uk> References: <1574259798-144561-1-git-send-email-zhengbin13@huawei.com> <20191120154552.GS20752@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191120154552.GS20752@bombadil.infradead.org> User-Agent: Mutt/1.12.1 (2019-06-15) 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, Nov 20, 2019 at 07:45:52AM -0800, Matthew Wilcox wrote: > On Wed, Nov 20, 2019 at 10:23:18PM +0800, zhengbin wrote: > > I have tried to change last_ino type to unsigned long, while this was > > rejected, see details on https://patchwork.kernel.org/patch/11023915. > > Did you end up trying sbitmap? > > What I think is fundamentally wrong with this patch is that you've found a > problem in get_next_ino() and decided to use a different scheme for this > one filesystem, leaving every other filesystem which uses get_next_ino() > facing the same problem. > > That could be acceptable if you explained why tmpfs is fundamentally > different from all the other filesystems that use get_next_ino(), but > you haven't (and I don't think there is such a difference. eg pipes, > autofs and ipc mqueue could all have the same problem. If you think that anyone is willing to pay one hell of a price on each pipe(2)... Note that get_next_ino() is pretty careful about staying within per-cpu stuff most of the time; it hits any cross-CPU traffic only in 1/1024th of calls. This, AFAICS, dirties shared cachelines on each call. And there's a plenty of pipe-heavy workloads, for obvious reasons.