Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp845910pxf; Thu, 25 Mar 2021 15:39:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzD7HmVo+E5iiM3dLI3LJrZLRTsy3uhk5/Gs9UCn0c+95CjB6y51q9VsMUIIcaSFR6X5z6G X-Received: by 2002:a05:6402:9:: with SMTP id d9mr11582473edu.67.1616711983513; Thu, 25 Mar 2021 15:39:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616711983; cv=none; d=google.com; s=arc-20160816; b=q8kzu/YIneJoy+zIgyl4o8sPzlybKRm80Towa+xEK7HHQfjz7rUc5g5q7IZ9mrnYpk psBLSBZ75aXhVOEPUP7X0dYidPGHusPgdG1dWWHSHqtGuGtRrqokKxd9tY46n2sTgMVa fdd+JePWnpovuHcF5y+eivY6UsUz9E1l14oKNa7p4vdmYhE+myyQtco+e+rjkNqtlbWj vHlKBNwP15kQ/PXB4yy5lMgoScwruD0EtdtyGDp/tEjYWJt9yVfs9ogVbYPZXyHYcqBy MZhLSDri2gHsGVRVqEiyZ+EJH6ESxe8mMHWkuCrN+m9rTScBlIyC8Vvm84VGNID+u0fx 8WVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=5e4oQJs7D+v1Fp3qOgnpvnuKs8stkr9RsHaAFeuS1Fc=; b=kWXotFu1K2/3smm2Bslx5hcqM+S7k4LYbnkhOTD71t/XkKQ8Fp+55X+z6HR7qsKViB iLxy8YBndpEYueJtJ89fcJ8d2QOCepRPRH8mA7fAklJ5AUOCG6fM5a/NkdJ7TCVygGL0 ks3hczgcxLi9cb0GclV1cqPyHJyW/ONtVAhGarIg9PLoxsBGDwJmuCmI8X6DGlpjx4n0 jKmBD1yhI8kGxRnL8G5scqRREDH8xgyn0M1R81XaJVW40o5jHNdLPkUAIA9bQ785K7Vt Lc0F04YbWCRbN9qLLOrJ9ZnV/cuneAvp3RTslxzABva0E7BPawtalCsMCyvT5kMJKlvd Qq7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=ZFU9nYcC; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r9si5349399ejx.201.2021.03.25.15.39.21; Thu, 25 Mar 2021 15:39:43 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=ZFU9nYcC; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230341AbhCYWi0 (ORCPT + 99 others); Thu, 25 Mar 2021 18:38:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230285AbhCYWh7 (ORCPT ); Thu, 25 Mar 2021 18:37:59 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47AC7C06174A for ; Thu, 25 Mar 2021 15:37:59 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id z25so5209039lja.3 for ; Thu, 25 Mar 2021 15:37:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5e4oQJs7D+v1Fp3qOgnpvnuKs8stkr9RsHaAFeuS1Fc=; b=ZFU9nYcCw1i1YZLwUD9j6hzdpJn7J4V1dZU6rfkkC0CTqlwogXdIkiC/7xKG04aIBY PA92xy40DUv5AHeYhyJTT93+bTuuKfpRfF5xBzIpvKm63s6OjulKUT/Cp/9KZOQC72Hw QdfoxCxgbz5pWPRCuETEw+RkR53XEtwLJFTq4= 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=5e4oQJs7D+v1Fp3qOgnpvnuKs8stkr9RsHaAFeuS1Fc=; b=O1vszWHFgb+AcRh6gf6tJpFct6DWURZnO8NgnxdpQsYPWf+EdmxFzA9YKh4R/6fup2 0BOgx09vgeUKqkbrU4Azl2vj+quSUXjQQl/p6iD59ifGj1+Q/xRCSQziWncUGteBpIbW efExMs8mTll52PDuLGRVBs9kuQrz5qAZbpVWH637PCo36pefwv/G6he23mxAvdTQV7U7 svEdR/ZLzhQsbQV6yeFg/FO+yRHJh4aJ/rmZcW71krVvDNDCDvB89JDkqs4QGYUJKsbH AQMbi9Ss6lzZJoQX9Zc26Z956z3hG+1B7DYY/MFtjEVAiFq5SOwehiKFaTQNSxi2SE95 efCQ== X-Gm-Message-State: AOAM530Sj1v6CezTcAP7Q5GGY88fstR9rv7+mNZQ0+U4iChdLJ3oAD2C DKdZLWoSwZhK8XzAxaCc1pmnsVtTVl0wig== X-Received: by 2002:a2e:b60d:: with SMTP id r13mr7126679ljn.30.1616711877684; Thu, 25 Mar 2021 15:37:57 -0700 (PDT) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com. [209.85.167.48]) by smtp.gmail.com with ESMTPSA id z28sm955379ljn.117.2021.03.25.15.37.56 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Mar 2021 15:37:56 -0700 (PDT) Received: by mail-lf1-f48.google.com with SMTP id g8so4820723lfv.12 for ; Thu, 25 Mar 2021 15:37:56 -0700 (PDT) X-Received: by 2002:a05:6512:3ba9:: with SMTP id g41mr5979179lfv.421.1616711875760; Thu, 25 Mar 2021 15:37:55 -0700 (PDT) MIME-Version: 1.0 References: <20210325164343.807498-1-axboe@kernel.dk> In-Reply-To: From: Linus Torvalds Date: Thu, 25 Mar 2021 15:37:39 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/2] Don't show PF_IO_WORKER in /proc//task/ To: Jens Axboe Cc: "Eric W. Biederman" , io-uring , Linux Kernel Mailing List , Oleg Nesterov , Stefan Metzmacher Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 25, 2021 at 2:44 PM Jens Axboe wrote: > > In the spirit of "let's just try it", I ran with the below patch. With > that, I can gdb attach just fine to a test case that creates an io_uring > and a regular thread with pthread_create(). The regular thread uses > the ring, so you end up with two iou-mgr threads. Attach: > > [root@archlinux ~]# gdb -p 360 > [snip gdb noise] > Attaching to process 360 > [New LWP 361] > [New LWP 362] > [New LWP 363] [..] Looks fairly sane to me. I think this ends up being the right approach - just the final part (famous last words) of "io_uring threads act like normal threads". Doing it for VM and FS got rid of all the special cases there, and now doing it for signal handling gets rid of all these ptrace etc issues. And the fact that a noticeable part of the patch was removing the PF_IO_WORKER tests again looks like a very good sign to me. In fact, I think you could now remove all the freezer hacks too - because get_signal() will now do the proper try_to_freeze(), so all those freezer things are stale as well. Yeah, it's still going to be different in that there's no real user space return, and so it will never look _entirely_ like a normal thread, but on the whole I really like how this does seem to get rid of another batch of special cases. Linus