Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp141085ybz; Fri, 24 Apr 2020 13:15:55 -0700 (PDT) X-Google-Smtp-Source: APiQypIKfEgKp3J1hiqgxuAsHdxY+ivofq3z2WRowyH1HlMeCFDPhoAiP/Io6dVLppuC2m8AnM8L X-Received: by 2002:a17:906:17c1:: with SMTP id u1mr8971159eje.47.1587759355590; Fri, 24 Apr 2020 13:15:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587759355; cv=none; d=google.com; s=arc-20160816; b=QgX4OaPUWl+zeUzMmInBC8veD/ZtndjuzAycklyx00vW6dY22xdBUmeWPcBlWIAhqf ISwRR/bDTDOrYnZ5tYNbzPHPx77an1GgeQ4eHt38u6BTAmx67+QYdCcHPSlrYfjJkRjE uTglJ7K5qTlAQTntEC35ta3l8dzp0FhzS+vbxWQ6k3aZ5GiZwnQAHfyZJFiGQB4R4KDP /Um3c/ctimBiJmfSHJkC9s1f0YDaI2Q3jg2K6c/DHpfHR3vFsXypNvHP3cD9wMCgNYUN 50enCh23Yi+xN5kzOlTrKBFUSm836hMVmFoB7PmhSBPeEGw4A8KdviiOwaeWMJ/Tr0/4 rXIg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Qs6+14MYm0RtJWJZAe/BTNaI2oDLYoEFf/uXYdJz3a0=; b=sZ+YELXYG/B1UqL0Y/vgnWNJZK7FMRCIX7lO5ATE40X0QPlfi5Sr5ZEGtHJkRGtBuC r2CtC8DF5Ttdymjm7AE67ADGJLzDDBdKvZK0wq83RD2iftmj1dCvRPUCxTt622ADsV3T Tr1v975BIoqbENCwoU73EAepgXwKuespFsgw9pUFJsafGtys4he/XQe/8lXOaDPM0brl vPvxrMgJqQ9bNuVubq1AJS9oUPCkBOfagH3ZpWhASIT4ywxdqUSZ7oV+tRcFnDtTCez7 96wzncdFJQY2oyJWzzc9blUzQU0C/KzgPys5uewQ2rW212nTzxAg1djfSgIDmdhgJiuE e/5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=XU2xAeGd; 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 rp4si3709516ejb.205.2020.04.24.13.15.32; Fri, 24 Apr 2020 13:15:55 -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=XU2xAeGd; 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 S1729387AbgDXUL6 (ORCPT + 99 others); Fri, 24 Apr 2020 16:11:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725970AbgDXUL6 (ORCPT ); Fri, 24 Apr 2020 16:11:58 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A592C09B049 for ; Fri, 24 Apr 2020 13:11:58 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id h69so5133991pgc.8 for ; Fri, 24 Apr 2020 13:11:58 -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=Qs6+14MYm0RtJWJZAe/BTNaI2oDLYoEFf/uXYdJz3a0=; b=XU2xAeGdDX45+4hPCNU7IxLVo0JZZ6Bx6tMCnyn5VNjeTQcV0hREf6tVJNhEyb1MHx XtaWGYr8Id7oq5vvNYSjXNUdufUpL8bTzHx/ymbMxwEZ/6jup09FCj98l/jdyhvm6kWa c488yO0xUAyRbw2sO5yNirqXuHh1j1/+2+qUxOke8A2Eqtuy/tVWezlyagZlvXjkJe6l F86mkR2cjnS2tZoFyMfUBRVyYEf+mMuSw18w2WTKB4VcCBjAdWiwHncYG/vofBsLkIoR OSiUbG/V+TnRK+HvYrBpHGkBlVPREOCOwoApU6YTmxbHWPCV0zBFGO5k1vJOiR0sgWPX 7cHg== 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=Qs6+14MYm0RtJWJZAe/BTNaI2oDLYoEFf/uXYdJz3a0=; b=Jfd2wWiuX2eTlvV+b60QkfGWEM2sjc7F9jJ5Kn9xtVLc7GM8k/sxlCOstEUYt/GVQh fsAYzBfOMioDszpqXD9pvaoQ5OvBcMB+9i4IQkHuH+H0qh8H0kR2aE+EsqXRizywv57/ aRvQRHl1Ucdg+x50jDgPiMW6zjSlIzVINUDcSrxJ4K8NxBcqGaEnQPv2IlccL2aLIBiG B2nUg15nZT8dRPJEzOiYoccBGK5Y+UcJvXNfbQO29zwPwp2orEwdAXulaFa9soBbqr4C RqygI4wvFeoLk1/nq0QDp4P6GHzY5GaA3MW82OlhLQyCWHrrOVk/JJUFEZvI92PFRJGI zc6w== X-Gm-Message-State: AGi0PubApAgg55zxFdhNUxjqMpFLInjte8d1A8RdLxEjYB8VHRu/2XGi dk3nCO8skYenL1s76NEc3X+rqymrJKirrA== X-Received: by 2002:a62:3044:: with SMTP id w65mr11522316pfw.270.1587759116875; Fri, 24 Apr 2020 13:11:56 -0700 (PDT) Received: from [192.168.1.188] ([66.219.217.145]) by smtp.gmail.com with ESMTPSA id u9sm6007215pfn.197.2020.04.24.13.11.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Apr 2020 13:11:56 -0700 (PDT) Subject: Re: [GIT PULL] io_uring fix for 5.7-rc3 To: Linus Torvalds Cc: io-uring , "linux-kernel@vger.kernel.org" References: <156f8353-5841-39ad-3bc2-af9cadac3c71@kernel.dk> From: Jens Axboe Message-ID: Date: Fri, 24 Apr 2020 14:11:54 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/24/20 2:03 PM, Linus Torvalds wrote: > On Fri, Apr 24, 2020 at 11:03 AM Jens Axboe wrote: >> >> Single fixup for a change that went into -rc2, please pull. > > I'd like to point out that this was exactly the code that I pointed to > as being badly written and hard to understand: > > "That whole apoll thing is disgusting. > > I cannot convince myself it is right. How do you convince yourself?" > > And you at that time claimed it was all fairly simple and clear. I know, and I was pretty much expecting you to bring that up... > I repeat: that whole apoll thing is disgusting. It wasn't simple and > clear and only a few obvious cases that had issues. > > In fact, now it's even less clear, with an even more complicated check > for when to restore things, > > I think that whole approach needs re-thinking. Is the union really worth it? > > Can you guarantee and explain why _this_ time it is right? To be fair, this place is really the only place that is a bit tricky, since it's where we restore things. The rest is clear, since we know exactly which poll (&req->poll, or req->apoll) that is being used. The fix from last week ended up somewhat conflicting with the cancellation part, which is part of the reason it slipped. But I do hear your point. If we run into anything like this again, I'll bite the bullet and un-unionize this thing. I just care pretty deeply about keeping the footprint of a single io_uring request down to as little as we can, as we can be doing millions of these (per core). We've still got some room in terms of not spilling into the next cacheline. -- Jens Axboe