Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4120431ybg; Fri, 25 Oct 2019 13:39:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyO2qmyIoriBuxgYV7gG7oBRHRxVc9GpAmqtFlVJl8OAsrEnO3dKZijpiQJQ5OOb7EWKXky X-Received: by 2002:a50:8969:: with SMTP id f38mr6114667edf.211.1572035952794; Fri, 25 Oct 2019 13:39:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572035952; cv=none; d=google.com; s=arc-20160816; b=tIzusft5Vf2EsolC9jP182ap/cL/LMTmrEmBjtzoZVb9N/RKMAK6mdIw6ANViAxloJ tTUXJT27MI8/n66jt0T4yMp5GyuXvVmBi1zBo4TQ1ANufx+anyQbDNKUS0w8eN3VufUh nQzJ+ksYCO8WRrk4sCbCkl28fPUNccdXrrYW8B5ySQOSNT/WB3mMFM743RiA1cLPEeeI H2Ra8+7QNhMSZ3wb9RIK1rM2hBYS/sbDL99PHiAZkU7anU1nlrzBnKjt45o+2atUvNw1 8b5SAwr4p3/wnw+JE6bpslE/+K141tlyDqKQglGUEdlgLI/JKYIoFJvvHLiyFV8HWrKl Y++w== 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:to:subject:dkim-signature; bh=kj0Q87zyB0a/7QLfzAgAycchwCNPhaMuUvYcmDPD4qY=; b=sURGqeoreJZjoK2puxw02eqkJhRpyO9RDRpQ94weoYyskeQ1RHbWXeecK166xX1VNG brVjLLAJBdFG3s2B+wFtQGgc9iQTRlDqS9/3CQfTUXrm2vQyHmrc/ixHb1bL5Xo4IsIU z6g5EzfeK8E9NyG/i++bC7MMFE8MuYs/t7M9DL1wLx+MzDpONHVGlJPmmWNq1vLhRGqf 3DVbEuth+ohMmsIE9hCd3eYYE2/6oV/wT6wb3+yleY018K+cAZvNeiwpBjLfzp3Vv9l9 /h2qjDOMk2S362QxGCOyRNoFa45LTEYurDUxT9LXEstd8fn06kb2x/IfAsohfTyMTZVm King== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=h5cwpQZ7; 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 z35si1964457edz.260.2019.10.25.13.38.44; Fri, 25 Oct 2019 13:39:12 -0700 (PDT) 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=h5cwpQZ7; 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 S2409365AbfJYPBV (ORCPT + 99 others); Fri, 25 Oct 2019 11:01:21 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:34313 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407863AbfJYPBV (ORCPT ); Fri, 25 Oct 2019 11:01:21 -0400 Received: by mail-io1-f67.google.com with SMTP id q1so2792591ion.1 for ; Fri, 25 Oct 2019 08:01:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=kj0Q87zyB0a/7QLfzAgAycchwCNPhaMuUvYcmDPD4qY=; b=h5cwpQZ7+vwwuWTD2LhRfp4+b25WtDQ3PO3zK3Rx4C4yVWrXsEpkRK5/lb8RRk3teX wpFIRU+ig4CCHgVnZ9ugIGM8XOjqHJqV+B45z7uVwEVjuN5HMzuoMqUvFvGdM9APyisr YPhkU44gzZrQwd71VBJyqkqGgpVtAcZU154FLQd/wnHiGEVtjH3yhgrnT9XWMszT31uU gV9JmWtgQLJ5oHDfLJr58xBU5CWdnmTjt5MBNUwRX7UPMtikYHXtoyDY/hlTx+0iD0q0 +i38lntd6U8xUr2aJO5kv94smH9mhACfLrotwNhx8F+JuoeEe7kwLIyeJfR/mdDpYv1r XQTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kj0Q87zyB0a/7QLfzAgAycchwCNPhaMuUvYcmDPD4qY=; b=Clc8IYwy4ANj6pDO45rCkN/HYjz/1bESy4uNfsauhNzpW7QSwOauc3b+7yd7ffKkoy 74zx6H83eYQqxMP6QrdWp/aO84f3PGQ5OhAVuJVwg/bo8Z0sS0kNMnL9R+1S+OBJ4Vbs nxvpMN9Ey18S04x20nDcGz1qMfwdcjgxsX87d8Y6NamhRodBd8lC2JndyNwDSFrtUtil OHYGjT5vHzLM5Y7nPQjrN5ofUHR2YY7Rnrs1iLHJCITt9123CI4h2TsG3IE1wyYUUmuQ CbNtQSTHKCqg/GlkNhjlPP7LRJvv2oKYZ0LBFCT05uGoSV9ZbuK5ufLIOVOVll5I8/4a O8wg== X-Gm-Message-State: APjAAAXIB3s+r4IXNYv/Fq5Mx85E4rEDhf/ZNWRjYu3p3KasP/moC+kO H0toNzTAp02Fz6OQ47l3WFxhj/fUEKb09g== X-Received: by 2002:a6b:c809:: with SMTP id y9mr4281840iof.232.1572015679139; Fri, 25 Oct 2019 08:01:19 -0700 (PDT) Received: from [192.168.1.159] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id n123sm287754iod.62.2019.10.25.08.01.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Oct 2019 08:01:17 -0700 (PDT) Subject: Re: [PATCH 2/3] io_uring: Fix broken links with offloading To: Pavel Begunkov , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: From: Jens Axboe Message-ID: <0e6bdba3-d673-ed49-15da-51ac93af7a28@kernel.dk> Date: Fri, 25 Oct 2019 09:01:16 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.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 10/25/19 3:36 AM, Pavel Begunkov wrote: > On 25/10/2019 12:31, Pavel Begunkov (Silence) wrote: >> From: Pavel Begunkov >> >> io_sq_thread() processes sqes by 8 without considering links. As a >> result, links will be randomely subdivided. >> >> The easiest way to fix it is to call io_get_sqring() inside >> io_submit_sqes() as do io_ring_submit(). >> >> Downsides: >> 1. This removes optimisation of not grabbing mm_struct for fixed files >> 2. It submitting all sqes in one go, without finer-grained sheduling >> with cq processing. >> > Is this logic with not-grabbing mm and fixed files critical? > I want to put it back later after some cleanup. Let's revisit that on top of the 5.5 branch of io_uring changes, as that is being reworked anyway. I'd say it's not super critical, as the hottest path should be polled IO with fixed buffers, and it won't really change that. -- Jens Axboe