Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2965770imm; Thu, 17 May 2018 00:42:32 -0700 (PDT) X-Google-Smtp-Source: AB8JxZovMGsQHT+jGDp4J1K8/cIegPxCx/K7WBEv1+y/T08ZjyB7jin1uvPYSWJt1MWWzuyxRklT X-Received: by 2002:a62:3f4e:: with SMTP id m75-v6mr4145679pfa.176.1526542952906; Thu, 17 May 2018 00:42:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526542952; cv=none; d=google.com; s=arc-20160816; b=r9Y8o5X+k3ZCHt/8JFPwNtqy2+a+i7j8iPXvioa64cBiVvwxqYFIdx+uZc01T0Faq1 TLVuPVLYYyR3tYlGVe7KLd2pm7kSIbdGofGX7Ahi9/sQk0Nnjuu5GgHnNOWcUF5LBZ2I SS2KuG8clm+8l0qn2PSJgAWx7p0N3QIz7pZQqh9xua1qNc53VCy8lgPKnkdPyY5cgXg/ 4TuAC7yKkn5mGopVds2piQbfzQA+yx/NBAdTPpthrGN/2UTIg/WgK3KxUd/Zb8de6+iS GtvUGsOBgf8cKTet+Ksn9rfU9EGthMwakJh7sGRB0erxCWnIXbmgMrk+PjJp92iu47oS fE7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=JgccpYrq2E+fUW9VMFcP0rooVOmJIY34YPSmctKQn0M=; b=iN+lruJuDckdXq6bND3pGouhK5Ui+CiLRT7hwo15TgGiXco5A/0xhW38V7hQjxGeAi U6E1PUg4LMqILsv69Lq6J1RyTvqbZXsYtY4J5FH/hNUVV5Tzg6HLD9k+VTOfotuB5wzh uroT6ceoxo01VfbwRxPubAEUeXypJGTJFlYpMFSFjQ8bCtkI/obtY2qUcagAdhO2ar87 hOYksUDqnjMGUEy1YBOeaNrjoeiFS6gRCCoX/Ntx8sC8Dlvfva1PfHfLmLx0K4VZcllp 1Pb3ATIl6IHnFMPuiHajZBoBn1xbk87rVZaVoTL2S8wkJqf6+VdsA7VPJ6KlPIzKcYlW NUpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gCytodv7; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v61-v6si4478281plb.499.2018.05.17.00.42.18; Thu, 17 May 2018 00:42:32 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gCytodv7; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752265AbeEQHmI (ORCPT + 99 others); Thu, 17 May 2018 03:42:08 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35687 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751644AbeEQHmH (ORCPT ); Thu, 17 May 2018 03:42:07 -0400 Received: by mail-wm0-f66.google.com with SMTP id o78-v6so7172484wmg.0 for ; Thu, 17 May 2018 00:42:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=JgccpYrq2E+fUW9VMFcP0rooVOmJIY34YPSmctKQn0M=; b=gCytodv7TxDXIf4AvP1nUEmkTStq2aPEpXVAgyijaSBp+Lc+T4Wy/iKXp4kUEzO43K 4l021dejqJVPua1lRrTVmD96zPE3ed1mSVeA2aT2o5yemk8Sv4gdHwHTFCaNICd1fmyp y28aVFdmpi23h2zMchr7LHG63cXeKgkLVP7OzVcXhdExKbi6sF12ZoEeoy9OraC1ylgP NlZVkizQc3aj0wNS/u8AdSsuzEgeRMw9+M85qhnnQ6DXJMjtTF0Unq2V0Led2GXwnvBH IpZ6elhh51JGEmUBy669TjcwApydxbxPNJCmgegWC6+FWOxrCuH2HUi85Uv/IRP3Tk77 Ur7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=JgccpYrq2E+fUW9VMFcP0rooVOmJIY34YPSmctKQn0M=; b=oVFNpqaf27ptKytGjPc4YA1HljLsvbfvYCvVEtxBo2bQipHOGdHstn+ZjjIlOdcSMP U6E0xDl9gizLlLLvuGamOnnGXpq8r25qtTL+ia//tzDmk7lRcdb14Vc/4iHqo9vpKUhb fIKmZMuytxaK39D8LhVinO6hTqgz9SZEY8peFcD7D1Z+MPw6bxUvTJ1vN0OGG2OFwRD0 CEo7rlYnNrCmYsM3XlphOz1M96RvPiK6YzxT/wxE5V7K0nv6UFcGa0zV1c94W28Y43Zf C6N2InVqnwXOKPLxpH54o/Qm7FB8yqjj9d5lHmI3ELd15zGvUGJWUDMJBuDuWpRsCwhr mDBw== X-Gm-Message-State: ALKqPweBK8EpFoaMO5fcIoyjtbV0KJEW5Fu38eBW9U7OdiAtQHKfQ974 0yE7r/yHglvTjPyhwFWQ86zI X-Received: by 2002:a1c:d53:: with SMTP id 80-v6mr997060wmn.138.1526542926041; Thu, 17 May 2018 00:42:06 -0700 (PDT) Received: from avx2 (nat4-minsk-pool-46-53-177-92.telecom.by. [46.53.177.92]) by smtp.gmail.com with ESMTPSA id m134-v6sm6598560wmg.13.2018.05.17.00.42.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 May 2018 00:42:04 -0700 (PDT) Date: Thu, 17 May 2018 10:42:02 +0300 From: Alexey Dobriyan To: lennart@poettering.net Cc: tj@kernel.org, torvalds@linux-foundation.org, carlos@redha.com, luto@amacapital.net, akpm@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [RFC] better visibility into kworkers Message-ID: <20180517074202.GA3091@avx2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > The kernel APIs for all this aren't really good > though, and I always was reluctant to check for PF_KTHREAD, as that > flag is neither documented for userspace, nor available in any > userspace-accessible headers. However, I wanted to tighten this a bit, > and hence we now define the flag in our own code, as it appeared to me > otherwise there was no chance to ever make this fully robust. PF_KTHREAD was introduced in 2.6.27 and its value appears to be stable since then. I think it should be retroactively declared part of ABI otherwise people will continue to rediscover that all other means do not work. Empty /proc/*/exe is second best option for systemd and it's only one system call.