Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3446142ybg; Mon, 28 Oct 2019 12:59:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqylcBaaxM4f2Znoc9OYQdfzC1wqI/T7y4hcQcSxBRBtKu8ssi6Dvl50NFj0YR4jFSp2SyLw X-Received: by 2002:a17:907:38a:: with SMTP id ss10mr12371755ejb.325.1572292758371; Mon, 28 Oct 2019 12:59:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572292758; cv=none; d=google.com; s=arc-20160816; b=waMTodYABVeHOLKQePE6yIESe083Zq1rI5lqCZpRcqk+7R8vqUPPOW/sB36/uRUg/J HXAPH2Q0SBYzkAwYJk4p/DC1wfyoZKlZA3t7NSdZKEbv/En9As6QsE9H4wmTkPHiZnfy 0u+Ftr4I+PgbB75ozGW3+L68rDkHi0bbw4t0kStgaWqnPNGEryiiGh93Y60hx1YBbRCc obo1hZ6j0GV64ksj8+FWBN3thSa7/DB1FYBAWlCSZWSFnsFzDc7JFXlKvZcwKshc+hfh xM7ac2o6nkEjo08dpI2/ZOnY8kPTvn25nmpD4fvWKRTDAZ8/+V46kksf7qtKsV6iDirq U6pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to:date :references:subject:cc:to:from; bh=PeI2V61UyTQfEQi9oyiadGfDCVd/L4tuJteOCxdhhaU=; b=L7VFjQd/IP+xsSz1b8ASSTW1yXvICnTqpKXhLMPteWjMhMJJXb7KS1UwwPcfDLFnkb x23fVlj1kwSm7ZhH5jJZg7K6vcUSkE6sU5eU2cQgcSYmvmbeuiHXfqg0O0jAWcTh76Nh bn7E/Z5CX630tBq9QC3d+9vqBLgorjYDZrEn39Ee3MOmcVVBbTP+JfulmmatW4XjJDOx ZTwgoOdSb7tY0B14R/BcodVHuBeh3O3MHAQNOQF5NO+ad83eVEKTe+p/3QVW2hz8KKHB YrOqacOi5QwmTTGNf/tIkxlkiZ2h1iNkcgzWdlN927BbbFvWL3Q+XaE0D0iiLk7XU3SM 7L6w== 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 q7si8209812edi.103.2019.10.28.12.58.54; Mon, 28 Oct 2019 12:59:18 -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; 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 S1727357AbfJ1Lqq (ORCPT + 99 others); Mon, 28 Oct 2019 07:46:46 -0400 Received: from albireo.enyo.de ([37.24.231.21]:36510 "EHLO albireo.enyo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726961AbfJ1Lqq (ORCPT ); Mon, 28 Oct 2019 07:46:46 -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 1iP3Tr-0003qb-E9; Mon, 28 Oct 2019 11:46:39 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1iP3Tr-0003Ho-Br; Mon, 28 Oct 2019 12:46:39 +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> Date: Mon, 28 Oct 2019 12:46:39 +0100 In-Reply-To: <157225848971.557.16257813537984792761.stgit@buzz> (Konstantin Khlebnikov's message of "Mon, 28 Oct 2019 13:28:09 +0300") Message-ID: <87k18p6qjk.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * 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.