Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3685030pxb; Fri, 4 Feb 2022 14:06:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZJIrcRwGvT+fY+EyAO6HqLuNaQhFAAGE2QFxWV/BRBDbjA2NcfeDdj2eUkHqsl48EHGcA X-Received: by 2002:a17:906:5d13:: with SMTP id g19mr828911ejt.534.1644012391428; Fri, 04 Feb 2022 14:06:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644012391; cv=none; d=google.com; s=arc-20160816; b=ZtQGc5UpB8jY/e3z/ZrLD9+QS8TYLuoT9JUge/MTnUJ/q+f/J8bWijhcG5TpO1PAQ+ mAL+rIFPaGYkG1UNZHfiltrVM9ncmwELNi6vC2rGl9+GjGrivNuH2OZFop809PBaeild Yz/V/6S95OGcau2Kp1GP8+cl3wym3j9/X7UhxoWvc4yxmzMB7JUchxZ7rh84cFU0sNjZ iYS0MD6CqOuI7LaAySTwDrNRdxCbp6qo4UrrW/zFhmiu9uvTMcfqdpQAbyD5C5XfViC5 Fhurdiuelvcgso2Mx30oYK0ArKUXH8ug2e/m/IoeXibLPrvyYcXQVBmrAEo1emsZFngp HePQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=B670DNtJG0WdyNR5I1jFrgWciVu2OUtPUlpRz7Cp6s4=; b=Lj1kIviIU9ZdcUzcaV35h3L9nh3Pc89c8XA8uYYd4ailbIQG05M1UHblEWXV/W+BCs J/y9aps9wp0Uep6P9Yg7o/27ZOH57Dicpgr/6YPnmSZ26iu9HZ+wZmUQLGVVXCenX/ng Tfi6t9OLjFT3TsBFWcPHwK/GNoYGtCu87OzsdoQ8jgiJoTLf0CDZInAeFEnylIenqnQQ wg28EgaZxIrJakBEnXEdwMXia+3ItYZdd4MnQAZBMVkJuyTJxgQdPZVWPvuaAElLBv3v CHvseLr6b7wG5o4uxxtjebcUpg5YPurCyy40hRWUDEKLqlTgTucX6YjujbTh2svo0QFd lNhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dS2AM6xh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d17si2175763edj.467.2022.02.04.14.06.06; Fri, 04 Feb 2022 14:06:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dS2AM6xh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359496AbiBDPDQ (ORCPT + 99 others); Fri, 4 Feb 2022 10:03:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231511AbiBDPDP (ORCPT ); Fri, 4 Feb 2022 10:03:15 -0500 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E118C061714; Fri, 4 Feb 2022 07:03:15 -0800 (PST) Received: by mail-ej1-x62a.google.com with SMTP id s13so20339981ejy.3; Fri, 04 Feb 2022 07:03:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=B670DNtJG0WdyNR5I1jFrgWciVu2OUtPUlpRz7Cp6s4=; b=dS2AM6xhnrTEaTxC9t4tAcKlxxKPTdL/033hfhpA0gDiLjd6DQGTvKDWxZ/rKb78Ik zKny8enp3Ev0eAtezLwbrUs02cIlEjLDEVcqeGsVR8MAKK25XMOZU+BM1qhRi5NSH3qR UpQF7876vC40ky9hHaWhjgXh7+60zsstLTThm+DT2BSAnhSAwuJAfiFWCalB1h8hwaYW ASXyehCHsJabzP3Nk4iRu9Jx49kvOih++bIpAAZRCpSkL1MS6OYvYtbgtyZhp8CP9lRG HX+h09TChSV6Pff5SBjyjSswlvbDy3xenMjsYmIMMWMQ4/8Rmp9V577/qcYYY90/avAj mk0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=B670DNtJG0WdyNR5I1jFrgWciVu2OUtPUlpRz7Cp6s4=; b=8JIWiKYQsUazNjtkNFyggfL+7IcUo5A0uAIB+y6AYyIUW6pLY0fggNtHcpcSN/jsss 2plwbgCeJ/rORw2xfk9VaxjPPtd4X4gxakhwUbAerV5Dt+nDWW/xu+DVWXpfHvd/M1L5 gzVeeljuCMLVU3VUSsPIWZcoSwz1buKGiWsTgCXkwFv8ybdXZyotah105bQtJso86oLz 3F0PIlDmxldpVPxkXdKbeXkoD2a0AGHvB+EzUeu58eziQkPVcIrBU+FFFJ6croLonpqb yBhbQN/13MZ5ItxPpW83X+nOR7XYfvRnnLPiu/3UUoJa0Sp3D1Vx5y3ECQppcRKy9qla HxJQ== X-Gm-Message-State: AOAM530t2Ii/GRkKyIotMJmhsae/dzDpurbFXbXQoKJWxXj3zTou4UxG AoTve6x8nu83UNZo7rswcnFotuN1zlRtzg== X-Received: by 2002:a17:907:1c19:: with SMTP id nc25mr2942085ejc.354.1643986993950; Fri, 04 Feb 2022 07:03:13 -0800 (PST) Received: from [192.168.8.101] (37-48-40-106.nat.epc.tmcz.cz. [37.48.40.106]) by smtp.gmail.com with ESMTPSA id oz3sm736936ejb.219.2022.02.04.07.03.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Feb 2022 07:03:08 -0800 (PST) Message-ID: <54f98c2a-4a40-75ed-8f66-11cc6b2fd190@gmail.com> Date: Fri, 4 Feb 2022 16:03:06 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: Partial direct-io loop regression in 5.17-rc Content-Language: en-US To: Jens Axboe Cc: linux-block , Linux Kernel Mailing List , Ondrej Kozina References: <08e1dbde-b27c-fd99-294c-8e4715b92576@kernel.dk> From: Milan Broz In-Reply-To: <08e1dbde-b27c-fd99-294c-8e4715b92576@kernel.dk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/02/2022 14:32, Jens Axboe wrote: > On 2/4/22 2:22 AM, Milan Broz wrote: >> Hi Jens, >> >> It seems that there is a regression in direct-io over loop for partial >> direct-io reads (or perhaps even for other situations). >> >> If I run this code (loop over 6M file, dd direct-io read with 4M blocks) >> >> IMG=tst.img >> LOOP=/dev/loop66 >> >> truncate -s 6M $IMG >> losetup $LOOP $IMG >> dd if=$LOOP of=/dev/null bs=4M iflag=direct >> losetup -d $LOOP >> >> >> on older kernel (<=5.16) it reads the whole file >> 6291456 bytes (6.3 MB, 6.0 MiB) copied, 0.201591 s, 31.2 MB/s >> >> >> while on 5.17-rc (tested on today/s Linus' git) it reads only the full blocks: >> 4194304 bytes (4.2 MB, 4.0 MiB) copied, 0.201904 s, 20.8 MB/s >> >> No error reported, exit code is 0. > > Can you try: > > https://git.kernel.dk/cgit/linux-block/commit/?h=block-5.17&id=3e1f941dd9f33776b3df4e30f741fe445ff773f3 Yes, it works now. (Not sure why I did not check if this patch is mainline, as I know about it. My bad...) So this is going to some next rc, right? Thanks, Milan