Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3674680ybc; Thu, 21 Nov 2019 11:55:41 -0800 (PST) X-Google-Smtp-Source: APXvYqykGQflZBv7OYeqPC6k+/gCcZExnJDXKIaLjy3Z38CRLuHhWpiP8Y4NvgKl2Jks839bGLPm X-Received: by 2002:adf:d842:: with SMTP id k2mr13148808wrl.163.1574366141571; Thu, 21 Nov 2019 11:55:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574366141; cv=none; d=google.com; s=arc-20160816; b=Y9zhwuTusHjgNeaqtEjuGVPn43VIMALbkKxOk0baFNwTjXJOuhm8AonYvWSIFGzXzo gkp4W9KH3VhIzFTEtdCzj2sxFgcKk4cTtVZd3+TuGYsNAdLNlvl1jfKomVX1JH4WEUu7 kMUmy2mOrRjcRAK5zR1gb4wXbEqqS6s653zO5Jnj9Qk2dCdlEU7ECERtLSYXI7EComr1 ZhgeBy7Mh4qRTlcPYLlKHy46qdV+pSxS4vcYW5vQtraPJ+bopwMnO4DfzFNOKGFc5Ngq OY9/Y0fmqh+kOfs3uhOI9/c8/qXZTLhEGzjG2TQJi2hVcXZxW1jgEz0Rh7cKuzY7NKxt vMog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=5MEvzzFTv+KiLbevjBv7savooCbJd1WBk2QrzJkKsFY=; b=TUznIC4nALDmtsBkU3xOJzjC25sEI/GD8UMWB6amCjZcdzoU6kA4P8XrSB9pkSXhPV Q8HqkpFZFK33OozE73f/6za13vOla9kw3UN2bkcn99HEsfkiZS56bHdjjQc3OnfFbKUs 5y//Gji9r5QFha1cb1hd/IXKhdEH/RFZFp6yo53/jV7Di33tLi+fRfLJiXjZdwzJlzz7 /vbPi3APeOAK6lAPxhnG8aYjnODEhZQCsom69no6pZEzyD6aoH/tpS9Tt1gRr5Rn6fHP QP7pgUph62zhMSVme78i7MEoWImoyC5RPYSobH2U5UAdX6i7+tucpD+Mxi4UVWgcHfSG C3JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=mYSzUH86; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o19si2738929edq.238.2019.11.21.11.55.17; Thu, 21 Nov 2019 11:55:41 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=mYSzUH86; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726852AbfKUTyG (ORCPT + 99 others); Thu, 21 Nov 2019 14:54:06 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:34033 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726293AbfKUTyF (ORCPT ); Thu, 21 Nov 2019 14:54:05 -0500 Received: by mail-pg1-f195.google.com with SMTP id z188so2162597pgb.1 for ; Thu, 21 Nov 2019 11:54:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=5MEvzzFTv+KiLbevjBv7savooCbJd1WBk2QrzJkKsFY=; b=mYSzUH86irHH///s03frIqQ/lO9tpB6U4bVptlF+q3y3uBHsf6sqaxL69ibNhwYpUI +ouMzQtmOgXtgD4369UxSRTCU6WzvIV6VJ7+BCtAi7EEus7+/dNTd6uO8S/sgheE78ru n0GMzgijsyBvOlpjuGgx/D35jQKFDNb74dS5WPQfkpND2H9sbnO1Qjay+Y9GJ488JP6Q 74L2zN/2fBwcZQNz290u45SlY+4vi9eenYU0PmSiHPqgqH5nSc6YMNCMVhhBtJ0sHPaT n93z7Dgp00EgEHQbVeC1Pre5fz43M3koHgfckHtbnJHeYno7DTaRiWKUVA2hH/NxjaZD XqqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=5MEvzzFTv+KiLbevjBv7savooCbJd1WBk2QrzJkKsFY=; b=ohL1wmwzZAN/E538SdkOrd0XCdghyj2GFTvj+4DKJeK3MHXz8cNdKoh+Y2sXTrXo9I kE7xYOvRkzCDdmtcyLSK7f3Hx6jgtKo+cvHH2eRlNQdneTYPXF2N6z0tWTxckc4U9MVR xlkmQWNtfhrtkHk5GGvywzvyrl2ymvYHGZs6TZbEa0R7HaSxUl2rw5eaITmIKrQnYlOh BjrFGfvEkdgWfL15JGVuLKGwC19aXfnmgxXAQ8Hp9+LvOW6ORNXf4krpV0fgMqt7itdl MuvfxkTicYBcuiKoA5LKPMCAntmUVh2md5da0i4+KI6un1cCYTajds/exXskHyZhPQAl a/AA== X-Gm-Message-State: APjAAAU4b+f80Xs7+2YN57wcBmF8K/yE4zNePYnaitOzZX+kfSHbvflb fAxorIR/4TCx2voQiDXPhH4yZRVkk9U= X-Received: by 2002:a62:5485:: with SMTP id i127mr5019541pfb.186.1574366042834; Thu, 21 Nov 2019 11:54:02 -0800 (PST) Received: from [100.112.92.218] ([104.133.9.106]) by smtp.gmail.com with ESMTPSA id 21sm4539592pfa.170.2019.11.21.11.54.01 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Nov 2019 11:54:02 -0800 (PST) Date: Thu, 21 Nov 2019 11:53:49 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: "zhengbin (A)" cc: Hugh Dickins , Matthew Wilcox , viro@zeniv.linux.org.uk, linux-mm@kvack.org, linux-kernel@vger.kernel.org, houtao1@huawei.com, yi.zhang@huawei.com, "J. R. Okajima" Subject: Re: [PATCH] tmpfs: use ida to get inode number In-Reply-To: Message-ID: References: <1574259798-144561-1-git-send-email-zhengbin13@huawei.com> <20191120154552.GS20752@bombadil.infradead.org> <1c64e7c2-6460-49cf-6db0-ec5f5f7e09c4@huawei.com> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 21 Nov 2019, zhengbin (A) wrote: > On 2019/11/21 12:52, Hugh Dickins wrote: > > Just a rushed FYI without looking at your patch or comments. > > > > Internally (in Google) we do rely on good tmpfs inode numbers more > > than on those of other get_next_ino() filesystems, and carry a patch > > to mm/shmem.c for it to use 64-bit inode numbers (and separate inode > > number space for each superblock) - essentially, > > > > ino = sbinfo->next_ino++; > > /* Avoid 0 in the low 32 bits: might appear deleted */ > > if (unlikely((unsigned int)ino == 0)) > > ino = sbinfo->next_ino++; > > > > Which I think would be faster, and need less memory, than IDA. > > But whether that is of general interest, or of interest to you, > > depends upon how prevalent 32-bit executables built without > > __FILE_OFFSET_BITS=64 still are these days. > > So how google think about this? inode number > 32-bit, but 32-bit executables > cat not handle this? Google is free to limit what executables are run on its machines, and how they are built, so little problem here. A general-purpose 32-bit Linux distribution does not have that freedom, does not want to limit what the user runs. But I thought that by now they (and all serious users of 32-bit systems) were building their own executables with _FILE_OFFSET_BITS=64 (I was too generous with the underscores yesterday); and I thought that defined __USE_FILE_OFFSET64, and that typedef'd ino_t to be __ino64_t. And the 32-bit kernel would have __ARCH_WANT_STAT64, which delivers st_ino as unsigned long long. So I thought that a modern, professional 32-bit executable would be dealing in 64-bit inode numbers anyway. But I am not a system builder, so perhaps I'm being naive. And of course some users may have to support some old userspace, or apps that assign inode numbers to "int" or "long" or whatever. I have no insight into the extent of that problem. Hugh