Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3135826pxy; Mon, 3 May 2021 16:20:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2tAv3EScGV0aiWo7BO8C6DYtqy3x/r+QetFyHTO3Ani4jYvaqUlgFdZq7iauWe5T++LZN X-Received: by 2002:a63:160a:: with SMTP id w10mr6626478pgl.225.1620084047835; Mon, 03 May 2021 16:20:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620084047; cv=none; d=google.com; s=arc-20160816; b=UFEUDoj6RMqevgvo22kqU595znPBll6em1R5UUo7tp55vN28YeMEbo3u3yRfECz1nf AxqEslwrQiLFGo+lhKHAiPm2tded5/KgAh0bUgqrxJqYz9UvGmIEVv0iXW/YZOSs7WNy gRbXa20lmAkEha9sKaY5FNkU+zFt8md2nScb/2aLiAzJ2TKe0dMJRlKUXXl3+zFbSi4u nsezDGGr6kYJRqfA7nUOGYJRMDwFc5dKMyCycUKsbZAAVcVKD6uyXrjK9hyP8yH0BK6R gcKDQyuTfson2YH56G8URE5IMhKmuvYDQA8ZxWbLT8rGjY1wtdDoSeSp/XRhEaS6YEeh Yi9g== 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=0FtWWY4fmD6WRB9NPPZH54mCyUXdEKHNKiJkPNTthSs=; b=lkm4GpTU9V2UhGw6QNTOXifKA0JQzvXXsNxGkmXkH/ACEteuDZFqS1+6p6Hq23i4U9 zOlWJZATZ7wN9gmymk+KwzmDa17DgcQVmFsONRBzTfDOO++OdjRFBS/e7i6nVl8j9jlS qc1Ds3jwscyOkdaqMszXpzmKB9G5OS7t/KmsUM1+9D0EeoGsD/bwmFqGIfS0pdoeGY6g EjwaelQfCVIJbZW3MsTHySWXy6RtnEyNcc+FJFbKutWO4B/oKliHX7FISybIWKbi/WKO 79K6T0tk1j2puYgV5EeAPoUCzJd/66rz5eLf3SjYc6Q81zoScnNj8nfnwo5vUtI+2QzK UgeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=YTSJyNPs; 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 q64si517406pgq.401.2021.05.03.16.20.33; Mon, 03 May 2021 16:20:47 -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=YTSJyNPs; 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 S229886AbhECXUt (ORCPT + 99 others); Mon, 3 May 2021 19:20:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229767AbhECXUr (ORCPT ); Mon, 3 May 2021 19:20:47 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4F37C061574 for ; Mon, 3 May 2021 16:19:53 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id x20so10554766lfu.6 for ; Mon, 03 May 2021 16:19:53 -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=0FtWWY4fmD6WRB9NPPZH54mCyUXdEKHNKiJkPNTthSs=; b=YTSJyNPsF4SuX8si33iysNtNVQ17vvy6CH1XN0+xVLJ4Am0L24sPQWs+u7O32+eW4b KVy+tXKv0wu0UENmRhWTAUxvGV37YYlqLH2LJm6MeIC6OE4qJYMWgCFuZCaXe5EE0R8F e90GPaqDfOXzM2vnc3ipJnsj/C4n713z4wWiM= 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=0FtWWY4fmD6WRB9NPPZH54mCyUXdEKHNKiJkPNTthSs=; b=CWf5vUD5ApfYkYMxFowu0XmXkSX0sOKNuWPMPedv+UUgFzVG6qkEb4Tjahnqt+xYjv f3C6VdOxenfpfGCIbeKjCGF2a3+neZoET8YfDNJO1J5NEHPya+fBq5++g2dGiPVumkbL hwcR8DUFUaCTzFQY+gQf8WEbxd1naPteDwkmvo2ja5s7k66lwmYG4nt6Eyt0Iy8RbhYh MjEkrqMJfKH6xExLmiDfIkZjqPsFL6LKbfJo9ezkYzfNV9LO6Y4JhRstIfKMSRVDvl0b ve7I9QZ5zh8o1Dg0vBByVvOdmOGILyo7yWBMZ1SFUbJCFiJW6HUWQaOWGsWjuhDlgxnT oNMQ== X-Gm-Message-State: AOAM533mVtIAW7x9rLW9rOig4/7WSMEwU1kKivJ3mtGuw1PfVY1pbL8s RA/ptlKYY8PLwo+5yz8yP5xf2YzstikzlPXT X-Received: by 2002:a19:c104:: with SMTP id r4mr5157854lff.555.1620083992219; Mon, 03 May 2021 16:19:52 -0700 (PDT) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com. [209.85.167.44]) by smtp.gmail.com with ESMTPSA id a20sm1404829ljd.105.2021.05.03.16.19.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 May 2021 16:19:51 -0700 (PDT) Received: by mail-lf1-f44.google.com with SMTP id 124so10559756lff.5 for ; Mon, 03 May 2021 16:19:51 -0700 (PDT) X-Received: by 2002:ac2:5f92:: with SMTP id r18mr15048326lfe.253.1620083991473; Mon, 03 May 2021 16:19:51 -0700 (PDT) MIME-Version: 1.0 References: <8735v3ex3h.ffs@nanos.tec.linutronix.de> <3C41339D-29A2-4AB1-958F-19DB0A92D8D7@amacapital.net> <8735v3jujv.ffs@nanos.tec.linutronix.de> In-Reply-To: From: Linus Torvalds Date: Mon, 3 May 2021 16:19:35 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] io_thread/x86: don't reset 'cs', 'ss', 'ds' and 'es' registers for io_threads To: Thomas Gleixner Cc: Andy Lutomirski , Jens Axboe , Stefan Metzmacher , Linux Kernel Mailing List , io-uring , "the arch/x86 maintainers" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 3, 2021 at 4:16 PM Linus Torvalds wrote: > > These days they really are fully regular user threads, they just don't > return to user space because they continue to do the IO work that they > were created for. IOW, you should think of them as "io_uring does an interface clone() to generate an async thread, it does the work and then exits". Now, that's the conceptual thing - in reality one thread can do multiple async things - but it's the mental image you should have. Don't think of them as kernel threads. Yes, that's how it started, but that really ended up being very very painful indeed. Linus