Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp733984imu; Thu, 22 Nov 2018 04:39:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/WrAhI1zx2CJJPRH36S7E5aHj+Uo8ScOHMsEcy2DQS6iqzsAklM3JXZG4Hm7Bhoj5jWuNlQ X-Received: by 2002:a63:314c:: with SMTP id x73mr10048921pgx.323.1542890385858; Thu, 22 Nov 2018 04:39:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542890385; cv=none; d=google.com; s=arc-20160816; b=DnQuI2r4panjsCpKOc2rQVlUSCpYuE1LqzBa+l/wxi+X68Wc/3BDU5zBWyZKn15muw E65d9+0BzHCBf9ZzeUTlQvXELT7YyxXEzX+p03DU9A0rT5txzli68UUJ1Vuqruo8ll1K qGizT1TGT06LFUWIo1s3GZZ5Ebsy5PsYqjsDbmRXkGx5arjwBMd2dVZfe/bbGyp3NKeR T6+TYW9rcXskUE+KRNdJUQQvFn/e99fznOY9svS0ZXd9K8UQk1O3jgS15zD29+DUunYE tRChvuWXWR7CWwuRmhxWekOpKFzkd3y/NdMFhFdRSq0rRTjCB8ZyLt071/9YgwqN2ME6 yhAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=TIol9f7D5WmIGnbwAI4oKfbT63Pb3xl34K02bF/Zp/8=; b=tlwEhNxCPo+UDF8w4bdZg7BbdFUSNqCE0A/SjAo7JK3TO2vLlTiBiIj5hCx1kAmJiO gI085ytWe8/00aDag0b97E2YN1vZ8qlQ0PkjxJybqDNKpAN+4zGOf3dI2FK3Srs32AAl z4cvMEjFEPZhzd3VkSBH8Ew/5EIh4GB/56z4pE2cnQlgVM2zMe+oRoSG/U4j9whSs/IX orV4uRok8c3JCW+kDAzGkdk/ASuBuCIZikURJLITISbd4LzPVh7qTFvdKpa9aMrpmacJ TYNouEkpXPD8PmJUa5RJoyaZAqEHr015/U4oARdMY3DigOlxzqAxTT2iKOsWQtzthXp7 TrDw== 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 h1-v6si51925894pld.332.2018.11.22.04.39.30; Thu, 22 Nov 2018 04:39:45 -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; 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 S2391199AbeKVLeg (ORCPT + 99 others); Thu, 22 Nov 2018 06:34:36 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:45636 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730678AbeKVLef (ORCPT ); Thu, 22 Nov 2018 06:34:35 -0500 Received: from localhost.localdomain (c-24-6-170-16.hsd1.ca.comcast.net [24.6.170.16]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id F37F386B; Thu, 22 Nov 2018 00:57:42 +0000 (UTC) Date: Wed, 21 Nov 2018 16:57:41 -0800 From: Andrew Morton To: Daniel Colascione Cc: linux-kernel , Linux API , Tim Murray , Primiano Tucci , Joel Fernandes , Jonathan Corbet , Mike Rapoport , Vlastimil Babka , Roman Gushchin , Prashant Dhamdhere , "Dennis Zhou (Facebook)" , "Eric W. Biederman" , rostedt@goodmis.org, tglx@linutronix.de, mingo@kernel.org, linux@dominikbrodowski.net, jpoimboe@redhat.com, Ard Biesheuvel , Michal Hocko , Stephen Rothwell , ktsanaktsidis@zendesk.com, David Howells , "open list:DOCUMENTATION" Subject: Re: [PATCH v2] Add /proc/pid_gen Message-Id: <20181121165741.ef089df784482632c4a66370@linux-foundation.org> In-Reply-To: References: <20181121201452.77173-1-dancol@google.com> <20181121205428.165205-1-dancol@google.com> <20181121141220.0e533c1dcb4792480efbf3ff@linux-foundation.org> <20181121145043.fa029f4f91afddc2a10bb81e@linux-foundation.org> <20181121162247.467fcab6c0aca0819a822286@linux-foundation.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 21 Nov 2018 16:28:56 -0800 Daniel Colascione wrote: > > > The problem here is the possibility of confusion, even if it's rare. > > > Does the naive approach of just walking /proc and ignoring the > > > possibility of PID reuse races work most of the time? Sure. But "most > > > of the time" isn't good enough. It's not that there are tons of sob > > > stories: it's that without completely robust reporting, we can't rule > > > out of the possibility that weirdness we observe in a given trace is > > > actually just an artifact from a kinda-sort-working best-effort trace > > > collection system instead of a real anomaly in behavior. Tracing, > > > essentially, gives us deltas for system state, and without an accurate > > > baseline, collected via some kind of scan on trace startup, it's > > > impossible to use these deltas to robustly reconstruct total system > > > state at a given time. And this matters, because errors in > > > reconstruction (e.g., assigning a thread to the wrong process because > > > the IDs happen to be reused) can affect processing of the whole trace. > > > If it's 3am and I'm analyzing the lone trace from a dogfooder > > > demonstrating a particularly nasty problem, I don't want to find out > > > that the trace I'm analyzing ended up being useless because the > > > kernel's trace system is merely best effort. It's very cheap to be > > > 100% reliable here, so let's be reliable and rule out sources of > > > error. > > > > So we're solving a problem which isn't known to occur, but solving it > > provides some peace-of-mind? Sounds thin! > > So you want to reject a cheap fix for a problem that you know occurs > at some non-zero frequency? There's a big difference between "may or > may not occur" and "will occur eventually, given enough time, and so > must be taken into account in analysis". Would you fix a refcount race > that you knew was possible, but didn't observe? What, exactly, is your > threshold for accepting a fix that makes tracing more reliable? Well for a start I'm looking for a complete patch changelog. One which permits readers to fully understand the user-visible impact of the problem. If it is revealed that is a theoretical problem which has negligible end-user impact then sure, it is rational to leave things as they are. That's what "negligible" means!