Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2368842ybv; Fri, 14 Feb 2020 17:21:20 -0800 (PST) X-Google-Smtp-Source: APXvYqwvUF8j+IVh6BOtCVhOvubZdM2/HTyiCWHGfwfY483bFvxXSBqfnjUcmcprtALRil5vU2ma X-Received: by 2002:a9d:6a90:: with SMTP id l16mr4187082otq.353.1581729680279; Fri, 14 Feb 2020 17:21:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581729680; cv=none; d=google.com; s=arc-20160816; b=EvyIutJwY28w9RGbA6gPeoDzYQFWL9XCOP7huM+ZBmc1YJXfTff/FKxxsjtEVq6jxG Ejx56aSOKnO9W3baTZhOYm9kPjnGt5qYpQ38heDGElZ90CPA0+M50srEjD8PC2gVY9Dy lSnhHStYenfPmxpyRxwQ/f2W74KV0yPNIWwG4f5pZObGYxKt0wehX44dLBgTQOIxNzJu tlgRytkaeTh9Z4ocLtQwhRgDkVp+1lEMnUPbNjIe7fCvL/ujlGqHdrHLEkNhm8d0VzUq OUH6aM6NMuTmSmCOZ3r7lv8E+ycrhZOwvf5x9VkLt5LFUObpQ1fdKk5I32CwaHqeYKso adFA== 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=Kq5+zg+BjWYmBTuTOQDyEJGh1pC/f5gJH8KP9SmE9fg=; b=gHk0yHMwapPqldQobL7+h9q+r0emGPgY6OwxgZ1bxkzWbsZsXVrEV+hECuF4REA9aB HuSODZFZIC2IhNX9TeOt5QM/VyvHCYlc0dx9xoVdSyVuq3czzpaGlQildcA4zZus9RRS W3/6ObRiX6Usuy9sWW9qV4V1p9vssW450zTcOe7DMfKaAfguPI9mk4Xv1eYOCBRS/iAq mbWNe4zLIV0vVPNdVo06aIAvvShm/vHxjojOScgGf0pEOBQEKk8T2IViJ8BLzIdBY/kN 4uIRSuPfixh47KOOVjoZo1YUhQG0wFbpAIGtbb5Aq2mL9/v86EQJwljDcm/onuMd8Apl MFnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=XpYT65RR; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z21si3536858oti.199.2020.02.14.17.21.06; Fri, 14 Feb 2020 17:21:20 -0800 (PST) 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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=XpYT65RR; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727763AbgBOBU5 (ORCPT + 99 others); Fri, 14 Feb 2020 20:20:57 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:39486 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727649AbgBOBU5 (ORCPT ); Fri, 14 Feb 2020 20:20:57 -0500 Received: by mail-pg1-f195.google.com with SMTP id j15so5797717pgm.6 for ; Fri, 14 Feb 2020 17:20:56 -0800 (PST) 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=Kq5+zg+BjWYmBTuTOQDyEJGh1pC/f5gJH8KP9SmE9fg=; b=XpYT65RR0Fi4QsHUQLu3MF7Hoh1ULvt2aa9HhPIww9v/ulAN+5OD5QeZsoRNTQKRVu pptPtLqwblpNiw0bFy8+N3Ka+gpX1rEnvjFaSjFJfYh3BH+iECY9n3LFtt0FHLvmQu0R rdqP2WfinfVvWWsSVaZMDWwd+FVhOAeMQkwwTJvGtAd26aII1GBSWjcR28K3oN1mVi1w XYNccYp6c9hCBG+4nIcKpczRRlFWgGGcv3zWIL3t4abUSNedJTn24AALa/IPQNYmOgGv 1pAqwpKqU4zZ0pyQBFoDY1NG44ExZTKzs51eseFiC7/S228ehhCOB7GmJerLdycMWqp7 XThw== 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=Kq5+zg+BjWYmBTuTOQDyEJGh1pC/f5gJH8KP9SmE9fg=; b=Jth+rA9BxGlHO1jUNqCbVRG5rpiO7qT1LDMSCPb2fcxFa5Zwqn3sZqh0A51ya5gy7T 2AwKwOJD0yC4Q5XxcDUxmjBpeL6UiIwdvaOWC0uXoM37RPtlzAdsvHzMXMF09cpaYbh6 DI8+yNTukTFn4t3E6pri9kaumajMUhdsZByztRGvwMu08WN/GBsrmNDqEAhGPRGb5fWw EpV9b1Fv3vLOsWmNNn/subSeLi8vvP1x11VCDkTNRh831Xi+iUvYxUleDbRWZeqYN078 O66u2Q+r7nweKc5eMNby8TeBC79UynwBhxeiNWhEe69IpLUeK8kVezwknKwTaEgxQSIL Yr3w== X-Gm-Message-State: APjAAAU0zty8DK0+TjxFB44Op+KexYteFxDF+GI9dHddpPzIDCCBp2wi fMYEaBO6OAmFi5bfxFOJoh+UNTV2GsY= X-Received: by 2002:a63:d04c:: with SMTP id s12mr6373035pgi.105.1581729655556; Fri, 14 Feb 2020 17:20:55 -0800 (PST) Received: from [192.168.1.188] ([66.219.217.145]) by smtp.gmail.com with ESMTPSA id p3sm8492017pfg.184.2020.02.14.17.20.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 14 Feb 2020 17:20:55 -0800 (PST) Subject: Re: [GIT PULL] io_uring fixes for 5.6-rc2 To: Linus Torvalds Cc: io-uring , "linux-kernel@vger.kernel.org" References: From: Jens Axboe Message-ID: Date: Fri, 14 Feb 2020 18:20:53 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 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 2/14/20 3:07 PM, Linus Torvalds wrote: > On Fri, Feb 14, 2020 at 8:45 AM Jens Axboe wrote: >> >> Here's a set of fixes for io_uring that should go into this release. > > Whaa? > > for_each_node(node) { > + if (!node_online(node)) > + continue; > > that's just silly. > > We have 'for_each_online_node()' for this. > > There's something like four patterns of that pointless thing. Sorry, that definitely should have been for_each_online_node() for those, guess I didn't think of that when making the change. > And in io_wq_create(), do you really want to allocate that wqe for > nodes that aren't online? Right now you _allocate_ the node data for > them (using a non-node-specific allocation), but then you won't > actually create the thread for them io_wq_manager(). I was thinking about this a bit, and as far as I know there's no good way to get notified of nodes coming and going. And I'd really like to avoid having to add that to the fast path. So this seemed like the lesser of evils, we setup the wqe just in case the node does come online, and then rely on the manager creating the thread when we need it. Not sure what setup was run to create it, I haven't come across any boxes where we have nodes that are present but not online. > Plus if the node online status changes, it looks like you'll mess up > _anyway_, in that io_wq_manager() will first create the workers on > one set of nodes, but then perhaps set the state flags for a > completely different set of nodes if some onlining/offlining has > happened. We'll look into making this more clear and bullet proof. > I've pulled this, but Jens, you need to be more careful. This all > looks like completely random state that nobody spent any time thinking > about. > > Seriously, this "io_uring FIXES ONLY" needs to be stricter than what > you seem to be doing here. This "fix" is opening up a lot of new > possibilities for inconsistencies in the data structures. We'll get it sorted for 5.6. Thanks for pulling. -- Jens Axboe