Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp479038pxa; Tue, 11 Aug 2020 07:43:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztInsK9O+IF2c18op6twP8R2Y0m5511eiQW0q/I3rBuf/3fv3jIAsu++2OFlnZmfLzWq7s X-Received: by 2002:a17:906:2506:: with SMTP id i6mr26204861ejb.72.1597157033754; Tue, 11 Aug 2020 07:43:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597157033; cv=none; d=google.com; s=arc-20160816; b=gEbGqMYhPcdD0aPnt9i7CeptyQNQs4rQ4heYUcf/SH42oaJQ/sbXCrrBwHgfbLI2ed Wez58/e83vw9YPkhTvXlI6p4jdcstJkLbnz96n83mAEq19UD/PBwA9tweszonnu7q//f v2kM3QYH+rXvrhe9Ker6nUH0Hz4U3kSsXfk6EDG14J01OgetCmDf5c2F7W6JdzDa/Rgu PPzcUcwNC+WcuQVqTDgoCMMf6Rcqon2pF48G4FnGQtfDXY6F94iIC5dR3mqfnH2YIAGE BH1Jw87BVHtIlreSNrfIRFsvtydCgvDPID5bUTgDWDIE7O3A4r+wUOBRjzOk/ENhiXSb 4+AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=hUl1gSBKaHXRpVfhwvv8rqqnc+dPfW10sijNbEhZKmY=; b=tCjZU/KQUJPupKxPSH9sdcfB2YqjG6R++7aL1Sb8ASIodGH3ipFC1zhNQQSaQIzabn jDBrpGmCPVFcRFoTOVww7CCBBlG8gE6hRRjs9UVaaUmwm0N/oA7ZpIBFDL4mnWRTJDTr T3NGTIkSZSwR8smvtMXhdjBv6hj/kr0FalxODx2Mg24yp5FHYTLJMBiRigpB/4O7xt2I 5YtDPgGbNf8PASg6KoJpllC9qXDhEcdJOUtbiMkyO/QvmU2Bz9MMsbXHrAr3mDsscfAI 9KsH3jueX4Z5EJalAimDI3E61G7elbBDGV5Npt4dXR52rQULbTHbH4O1L55FT5MaNEhU pqdA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w7si8984497edl.234.2020.08.11.07.43.30; Tue, 11 Aug 2020 07:43:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728817AbgHKOky (ORCPT + 99 others); Tue, 11 Aug 2020 10:40:54 -0400 Received: from mga02.intel.com ([134.134.136.20]:39417 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728750AbgHKOkx (ORCPT ); Tue, 11 Aug 2020 10:40:53 -0400 IronPort-SDR: 53KUnZqTTqY2CHQMgStOOuKS0hr/4CZAP37o6C2N4Jf/1TFRjPv6cksQ94N/KW+8lviwfHpR0X Rdbx6Q9xRtJw== X-IronPort-AV: E=McAfee;i="6000,8403,9710"; a="141595789" X-IronPort-AV: E=Sophos;i="5.76,461,1592895600"; d="scan'208";a="141595789" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2020 07:40:53 -0700 IronPort-SDR: JGfBK8o+ksaoxfDMs5qMmlA6+A78FyKE42qHn7BbegCwAzsraHtXotUojVRJoqvgefCiLl6opJ NWwTNkEGnCuw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,461,1592895600"; d="scan'208";a="324777032" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.21]) by orsmga008.jf.intel.com with ESMTP; 11 Aug 2020 07:40:53 -0700 Received: by tassilo.localdomain (Postfix, from userid 1000) id C5847301CAF; Tue, 11 Aug 2020 07:29:55 -0700 (PDT) Date: Tue, 11 Aug 2020 07:29:55 -0700 From: Andi Kleen To: Peter Zijlstra Cc: Alexander Shishkin , Arnaldo Carvalho de Melo , Ingo Molnar , linux-kernel@vger.kernel.org, Jiri Olsa , alexey.budankov@linux.intel.com, adrian.hunter@intel.com Subject: Re: [PATCH 1/2] perf: Add closing sibling events' file descriptors Message-ID: <20200811142955.GC1448395@tassilo.jf.intel.com> References: <20200708151635.81239-1-alexander.shishkin@linux.intel.com> <20200708151635.81239-2-alexander.shishkin@linux.intel.com> <20200806083530.GV2674@hirez.programming.kicks-ass.net> <20200806153205.GA1448395@tassilo.jf.intel.com> <875z9q1u3g.fsf@ashishki-desk.ger.corp.intel.com> <20200810144518.GB1448395@tassilo.jf.intel.com> <20200810203632.GF3982@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200810203632.GF3982@worktop.programming.kicks-ass.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 10, 2020 at 10:36:32PM +0200, Peter Zijlstra wrote: > On Mon, Aug 10, 2020 at 07:45:18AM -0700, Andi Kleen wrote: > > > Unfortunately we're kind of stuck with the old NFILE=1024 default > > even though it makes little sense on modern servers. > > Why can't that be changed? It seems to me all of userspace changes all > the time; heck that system-doofus thing flushed 20+ years of sysadmin > experience down the drain, just cause. Why can't we up a file limit? We could try, but I believe it's hard coded in various places outside the kernel. But this wouldn't solve the problem of the unnecessary overhead of the inode + file descriptor per event that the patch was trying to address. It would just waste more memory. And increasing it makes the worst case memory consumption you complained about event worse because the real limit per uid i RLIMIT_NPROC*RLIMIT_FILES. Of course NPROC needs to be large enough too, so the total just becomes bigger and bigger. Ultimatively you need another accounting mechanism that actually works per uid without extra factors. Now perf already has one so it's still unclear to me why we can't use it. -Andi