Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1124784imu; Tue, 20 Nov 2018 12:07:04 -0800 (PST) X-Google-Smtp-Source: AFSGD/Ve8S60zwG6XuxjWQJw+NKiFUEhDkTT0+mR52C3q4VsHfrX1hMhAYF2kV1udU+TFSaH4M+H X-Received: by 2002:a17:902:b903:: with SMTP id bf3mr3561730plb.289.1542744424582; Tue, 20 Nov 2018 12:07:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542744424; cv=none; d=google.com; s=arc-20160816; b=PQdWD+b+gdDdFxakRXOa+/ORio5PgD5ZQOucuDlUcstYnMzbmjVXEBfFlNreHfEDvO RIRz4JKl8nX1GcltnkpoJuLwZQvH/hEjJHpMhUfOyW2xRKt2rCGgcrChaiizfWmdFxzJ PeZax2kHsXRCIe1rlZGeNiThiTDY/UwLWC0RmyfBzFFnU0UA/zAPsriE+xoswbAC5dKd 0QDBi15sD5KgZM4Ei+XDu4hLO58uVmLUL75YvG7Nca3lW9Q0py+ViOBB1v+0eKqIgrAg PuG+B4VQo/omo+ygJgic/WSi7kXNk3PpeCQOzOvrNZbGrdByIpkTjAKk88zcAdiKDwWw ka1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=dN5F5JjkX8qXx7CGqsA8pOnFZ6513BsOrkwubwTzl6Y=; b=eSzLqyJsha5LzCGuTsRc9393AgRCy5W/xNxoNkoQBLEwq6tb6yTmWNQktTrDoFE7XN VRNHSHdSYHC73Wpk4MUKuIoG31G7Uml7dpauS/lYO7rtfR6U5ytElmhheOuX4GmuH0nb QlxIT3nLZC8rXw+NWt43j2ckVTxml790PyZib2Jjhq5eO3oQ1aH0RT3l/9Vw9qY2zqti PXYvdlYiQsSMgXJVtkc5TJGCrUj6YILtbLJkUhmqlLiJo8c2Vpd0oBwioDa7emyvW754 Vc+55L8kGg7l/Xsu3YEWSbdtPpMlAH8ORitL9SUrdeQ0lXjM8hx9ZiDCklQCbkVD+U3N t7MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=jOOpq+fr; 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 j184si16889783pfg.160.2018.11.20.12.06.45; Tue, 20 Nov 2018 12:07:04 -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=jOOpq+fr; 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 S1728635AbeKUETC (ORCPT + 99 others); Tue, 20 Nov 2018 23:19:02 -0500 Received: from mail-vs1-f65.google.com ([209.85.217.65]:37107 "EHLO mail-vs1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726314AbeKUETC (ORCPT ); Tue, 20 Nov 2018 23:19:02 -0500 Received: by mail-vs1-f65.google.com with SMTP id h18so1604241vsj.4 for ; Tue, 20 Nov 2018 09:48:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dN5F5JjkX8qXx7CGqsA8pOnFZ6513BsOrkwubwTzl6Y=; b=jOOpq+fraVncoarOWAFx7rMbxvglr0X2TN6+XPIecpWtseOivq4bhl37mS3+xWv5ly ZNkbsAR5kshlnNE9NSiHy1bH1cBqpNQUiVo1rixFectKn9dyHQoMVJoNJG397AEDj94j R4phZwjjJm9+u7s08ZtUKj/gpxNk8kCww5609VfLpSTGaL2FEtg5tNF3HybFRh4i7RGH Cl1AmXMT0SE3OwNPy5meSuwYf3oaeC70T9NFj1cfhmvSV7hpgEDxX+zOAjKFbBa+eOM2 8lmcKz2pONp0+gymZnM0h1gER/alu22Km85bq8k/5wfR7m9hTw/WOd0Hvx9aSkKk2d4C TJww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dN5F5JjkX8qXx7CGqsA8pOnFZ6513BsOrkwubwTzl6Y=; b=kUAdoA/VcaO0RhWBVa44Km4/o2e6fGmPPYdbXuXxEnVG0IN+d/bd7C8OtgZmXdHH/3 i8Wa4aFYjr0nYn/Nw2GjhVzXcrOsf1GAq3ch07y72lqDqPJuH3jOWGuMUKZVDYbDvNHA ubav9iBBe1KJYgq8j1nXuo14mcukkoOrckhgvPaWSAZdW5uoIk7iCG0CisH8ILoCKjhV F89ED3lY7ODyTacAy5MRGESmX1lalrCGLOFfXPxqkfODH6+fMG+avAXdorpfQIiqtrP5 dxqmlugagvzMYVl+HKMQxlnURL7fmskjHPDPh747LlufvXAdgzkjJpEW/jj1FAy4C+YH kDRA== X-Gm-Message-State: AGRZ1gLnmBdiN4UuD1igRnQfDZ/rm3l1Wy1KgY06UE6qIFafdKFZxF4W CL/TDiQdcfu7Xz5EPU8vcka//e+dliBxbgSqau2t+Q== X-Received: by 2002:a67:b44:: with SMTP id 65mr1272308vsl.77.1542736119374; Tue, 20 Nov 2018 09:48:39 -0800 (PST) MIME-Version: 1.0 References: <20181031150625.147369-1-dancol@google.com> <20181105132205.138695-1-dancol@google.com> <20181119105426.GD28607@amd> <1c5caa66-3c61-cb57-754a-f099200c73b2@suse.cz> <20181120091829.GD16916@amd> <20181120173912.GD3065@bombadil.infradead.org> In-Reply-To: <20181120173912.GD3065@bombadil.infradead.org> From: Daniel Colascione Date: Tue, 20 Nov 2018 09:48:27 -0800 Message-ID: Subject: Re: [PATCH v2] Document /proc/pid PID reuse behavior To: Matthew Wilcox Cc: Pavel Machek , Vlastimil Babka , linux-kernel , Mike Rapoport , Tim Murray , Joel Fernandes , Suren Baghdasaryan , Jonathan Corbet , Andrew Morton , Roman Gushchin , Mike Rapoport , "Kirill A. Shutemov" , "Dennis Zhou (Facebook)" , Prashant Dhamdhere , "open list:DOCUMENTATION" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 20, 2018 at 9:39 AM Matthew Wilcox wrote: > > On Tue, Nov 20, 2018 at 10:18:29AM +0100, Pavel Machek wrote: > > > would ever rely on the pid being reused while having the descriptor > > > open. How would that make sense? > > > > I agree this is corner space, but users might be surprised that > > keeping FDs of /proc/pid/X would lead to PID space exhaustion, for > > example. > > We have a limit on the number of FDs a process can have open for a reason. > Well, for many reasons. And the typical limit is too low. (I've seen people clamp it to 1024 for some reason.) A file descriptor is just a handle to a kernel resource. All kernel resources held on behalf of applications need *some* kind of management interface. File descriptors provide a consistent and uniform instance of such a management interface. Unless there's a very good reason, nobody should be using non-FD handles for kernel resource management. A low default FD table size limit is not an example of one of these good reasons, not when we can raise FD table size limit. In general, the software projects should not have to put up with ugly workarounds for limitations they impose on themselves.