Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2758281ybc; Wed, 20 Nov 2019 20:35:05 -0800 (PST) X-Google-Smtp-Source: APXvYqyjsvaDwxNNVSzs75XVdlrrixZIQ/VQPOkMCK420SlYtVJIPVlpcj1P5x/yfZDT4V7rteO/ X-Received: by 2002:a17:906:4c8c:: with SMTP id q12mr10927307eju.256.1574310905114; Wed, 20 Nov 2019 20:35:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574310905; cv=none; d=google.com; s=arc-20160816; b=iK/DpGgLxKYGW3YVAFTnG7ae8NPUGHYndmtcpdb9C2hUFrALth6ngJDze+KAjbUycK HEIAsqquJ7A8CGyKq6cEfaaXVWcJ3MukWZ931XfmVPE+J4Ve3ab4lotIn584Ab8UDs5t mjrx5C3bhNauGZp6pDtCknD7fof+GFZEDFmbfRafeW9DmhJE6T5IOwGTLB4nhrvnexJs MTjpQKcSiDz2/xsybHh8OI5nAlX4ufIOd67jQ/HdZ2ioXr/7zD7HjYGW+UEVd4y2gPZC DgxU2zPj3CHSGbihMGgraSJdRG06cWwNWGLkQ5mIeeT3urId9z/g9wdgiiIhlgNLfyNh Ibcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=0SGX7S+oP6h0G9KLjtgn+IG2WFXTG07rqeMh5+fJlcA=; b=bO+defHXqZ9+j2PyDYrA7Z1Q3AKlDUjCf2G79m9XDV9wkDrqkFhLl7D7v0MTzpkS1r n1Ib9Jnh8b3XPNBnmbBThh6iuwZm2eD3nsLb6XzBcun2jRFCKWMduKTioLekN/TrrSGA xvDHTkJDZOR+qZZvPfBQBUrm/+LElExSun2GO9qpQiKzK9YTvDvaImpbV4WIsPt+eD8a /uEL84D2g/DgjIBywwP+iDuTwXhqOL+zdva5WXiga3CP38GmEyu6SVug3lja76FVQwcn OK6FM14u/+PnE3Y5gOlDMcMjijTyTCUP1geyfNwx5M5J/vMcxZHmZJFAinDDnyasmmOl wTQg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n29si1400882edb.220.2019.11.20.20.34.28; Wed, 20 Nov 2019 20:35:05 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726132AbfKUEbu (ORCPT + 99 others); Wed, 20 Nov 2019 23:31:50 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:45636 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725819AbfKUEbt (ORCPT ); Wed, 20 Nov 2019 23:31:49 -0500 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.