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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 2EEF7CA9EC2 for ; Mon, 28 Oct 2019 13:06:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1003621734 for ; Mon, 28 Oct 2019 13:06:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388029AbfJ1NF7 (ORCPT ); Mon, 28 Oct 2019 09:05:59 -0400 Received: from albireo.enyo.de ([37.24.231.21]:37754 "EHLO albireo.enyo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726623AbfJ1NF7 (ORCPT ); Mon, 28 Oct 2019 09:05:59 -0400 Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1iP4iW-0007eV-DQ; Mon, 28 Oct 2019 13:05:52 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1iP4iW-0008D3-8w; Mon, 28 Oct 2019 14:05:52 +0100 From: Florian Weimer To: Konstantin Khlebnikov Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Michal Hocko , Alexander Viro , Johannes Weiner , Andrew Morton , Linus Torvalds , Roman Gushchin Subject: Re: [PATCH RFC] fs/fcntl: add fcntl F_GET_RSS References: <157225848971.557.16257813537984792761.stgit@buzz> <87k18p6qjk.fsf@mid.deneb.enyo.de> Date: Mon, 28 Oct 2019 14:05:52 +0100 In-Reply-To: (Konstantin Khlebnikov's message of "Mon, 28 Oct 2019 15:55:19 +0300") Message-ID: <87ftjd6mvj.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org * Konstantin Khlebnikov: > On 28/10/2019 14.46, Florian Weimer wrote: >> * Konstantin Khlebnikov: >> >>> This implements fcntl() for getting amount of resident memory in cache. >>> Kernel already maintains counter for each inode, this patch just exposes >>> it into userspace. Returned size is in kilobytes like values in procfs. >> >> I think this needs a 32-bit compat implementation which clamps the >> returned value to INT_MAX. >> > > 32-bit machine couldn't hold more than 2TB cache in one file. > Even radix tree wouldn't fit into low memory area. I meant a 32-bit process running on a 64-bit kernel.