Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2381046pxf; Sat, 27 Mar 2021 09:47:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEjTFvFjAEyQo+lbosIYrp7CdYGa0XWCqTygjfZVJ4EujAPlKBbqfrYBU5JDMqW7TEOofB X-Received: by 2002:a17:906:340f:: with SMTP id c15mr7948111ejb.317.1616863668372; Sat, 27 Mar 2021 09:47:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616863668; cv=none; d=google.com; s=arc-20160816; b=GTV9kXVIGBRKfrNy7YOWZuO1aZcptnQtmZrcXwbkSQhl8NgblruKf8R3WH5N9TUMG9 7QR4ynwlBBGmDScp3LggDyk6dMqS4CfcUTIpNI4AFqj2A70g5QXyUbY+54kV+/QGXB9Q uB6NI2Yijduw3FnZo7QZXwUHDiPdIT9Zfuv8+uVaxhDy51a64GIoBIZQS7lvHbHERxIT j2lH9R7yCrF0PTYDmebm0JuYU1ecswu67h0Acfu3zHd1a2Cy6kjTz5PRKIiNDGVf2JK2 b5uXD5LkmLL8peSilWEIi+KIyC8jLz3dLD6f9r98CpmO31HTZK5+nu6E3Mxfsq4aRMGt R8ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=b17SAdPX6nFOb6T7BOu2u77iGyZqgb6X+sWCVvCBRdc=; b=WZzd4A2T2dLr7RCtaH0jOn4nDuZ050i0CzNFpn0e0yM8Dj7/BIeHUi96tlK5W3D08x a/tlyfHTgXzxDVjlIyiq5D+dBnwIKcqs7pDADOp3Mfbxr9jD0raFUSpOe4kMaBxEpBtz p0ar4OSziIpe5ydZo/PhF1ldnnUtwC3VAn7XlqVGmI6bkQ7eg0ktk0e7G1r1/zu75KRR DkqT6YtUsvHkfkUoBVqL0EQLBnN2Vgmo6pOtkg9yLnm79BOryvdifQ61MA5FBKAkeT1f hLvxfm7UoSXF0v6C5xLGvewYkubO0N8AYKYYtpYMI6++FUzjwldpuarMJrs05Vd4jngB GXFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b="Q+gE3B/6"; 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 j20si9353298ejy.7.2021.03.27.09.47.25; Sat, 27 Mar 2021 09:47:48 -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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b="Q+gE3B/6"; 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 S230105AbhC0QmL (ORCPT + 99 others); Sat, 27 Mar 2021 12:42:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230447AbhC0QmA (ORCPT ); Sat, 27 Mar 2021 12:42:00 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E1CAC0613B2 for ; Sat, 27 Mar 2021 09:42:00 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id a22-20020a17090aa516b02900c1215e9b33so5688113pjq.5 for ; Sat, 27 Mar 2021 09:42:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=b17SAdPX6nFOb6T7BOu2u77iGyZqgb6X+sWCVvCBRdc=; b=Q+gE3B/6OXFXCQX+tZc1x4wvsgXzQa2ctNK6mgR5uqOVImk4Xx2if+48CuJ4ej6tlx 1/RCN+0K/loG6qQIplmww0cdU5kXQ5GUEUF6OEtih8TRvJwU2OSBkPd/7JKlnaU7GkiJ tlxoO9zhL5yCBeUmdzxf8pKMahsgTW56Wo9w8xYbkLev3BhlJwmZ3p2NEVbdILLQHxpx XiF1RrxJbri+nMBF5aHzYIMYj+QSj1OHDPsNPHxWmAVahncPqZBp403IjsxvbUslvHHn 2EaI5pw2N3jVry15oa7ehnmHD+20i/lSKWDHszUZ02xXOjTEpRib+rLZPlCHSuMSGbsZ A1SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=b17SAdPX6nFOb6T7BOu2u77iGyZqgb6X+sWCVvCBRdc=; b=V38JAvpswctiFmRHUc6S1iE6ccrPH/A7RQe+o6ggPwzpS7rNxHjfX3AButKEbhASXv d88mxwYpXSWmTUEnUkt4z2FwuJ5voPky4Qp4X+c80Qq6jSmKOjweQ++lF8mrWeYg90Ln J2xFuRcueHSLSCimQqBuF3ozhv4nj24nQW9N7BPxIVwzQ/2ah3rBJaA1fXAsjMYIrHpL TygKufkh2MFyTzk46dI3iGrDUK37LtVeXobt1d1z50Lu1iTKZt67KlBhCNU7aajjs+6q swUTjzlKEz8lXlhSvZfU2Lt4U748Vx9vZ9l82aObPCybOG6RN0VsDXjB6MkxcYDM5N9D F8TQ== X-Gm-Message-State: AOAM530JbsIDk1gI3CG9NrMaJOfHgY64DtwkS9ci4DI4fEcGJi2RmT43 YjRil4NQP0oG4xvEPhAKyWu26YISpPjoAw== X-Received: by 2002:a17:902:b908:b029:e6:3e0a:b3cc with SMTP id bf8-20020a170902b908b02900e63e0ab3ccmr20843430plb.68.1616863319379; Sat, 27 Mar 2021 09:41:59 -0700 (PDT) Received: from [192.168.1.134] ([66.219.217.173]) by smtp.gmail.com with ESMTPSA id g7sm11951769pgb.10.2021.03.27.09.41.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Mar 2021 09:41:58 -0700 (PDT) Subject: Re: [PATCH 0/6] Allow signals for IO threads To: Stefan Metzmacher , io-uring@vger.kernel.org Cc: torvalds@linux-foundation.org, ebiederm@xmission.com, oleg@redhat.com, linux-kernel@vger.kernel.org References: <20210326003928.978750-1-axboe@kernel.dk> <8efd9977-003b-be65-8ae2-4b04d8dd1224@samba.org> <358c5225-c23f-de08-65cb-ca3349793c0e@samba.org> From: Jens Axboe Message-ID: <548d1761-731d-2960-ee84-2e5ede73bdeb@kernel.dk> Date: Sat, 27 Mar 2021 10:41:57 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <358c5225-c23f-de08-65cb-ca3349793c0e@samba.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/26/21 7:46 PM, Stefan Metzmacher wrote: > > Hi Jens, > >> root@ub1704-166:~# LANG=C gdb --pid 1320 >> GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2 >> Copyright (C) 2020 Free Software Foundation, Inc. >> License GPLv3+: GNU GPL version 3 or later >> This is free software: you are free to change and redistribute it. >> There is NO WARRANTY, to the extent permitted by law. >> Type "show copying" and "show warranty" for details. >> This GDB was configured as "x86_64-linux-gnu". >> Type "show configuration" for configuration details. >> For bug reporting instructions, please see: >> . >> Find the GDB manual and other documentation resources online at: >> . >> >> For help, type "help". >> Type "apropos word" to search for commands related to "word". >> Attaching to process 1320 >> [New LWP 1321] >> [New LWP 1322] >> >> warning: Selected architecture i386:x86-64 is not compatible with reported target architecture i386 >> >> warning: Architecture rejected target-supplied description >> syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38 >> 38 ../sysdeps/unix/sysv/linux/x86_64/syscall.S: No such file or directory. >> (gdb) > > Ok, the following makes gdb happy again: > > --- a/arch/x86/kernel/process.c > +++ b/arch/x86/kernel/process.c > @@ -163,6 +163,8 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, unsigned long arg, > /* Kernel thread ? */ > if (unlikely(p->flags & (PF_KTHREAD | PF_IO_WORKER))) { > memset(childregs, 0, sizeof(struct pt_regs)); > + if (p->flags & PF_IO_WORKER) > + childregs->cs = current_pt_regs()->cs; > kthread_frame_init(frame, sp, arg); > return 0; > } Confirmed, it stops complaining about the arch at that point. > I'm wondering if we should decouple the PF_KTHREAD and PF_IO_WORKER > cases even more and keep as much of a userspace-like copy_thread as > possible. Probably makes sense, the only thing they really share is the func+arg setup. Hence PF_IO_WORKER threads likely just use the rest of the init, where it doesn't conflict with the frame setup. -- Jens Axboe