From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D5D5C433E1 for ; Mon, 24 Aug 2020 16:10:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2AE962074D for ; Mon, 24 Aug 2020 16:10:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20150623.gappssmtp.com header.i=@kernel-dk.20150623.gappssmtp.com header.b="0YBJsNOr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726519AbgHXQKQ (ORCPT ); Mon, 24 Aug 2020 12:10:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbgHXQKP (ORCPT ); Mon, 24 Aug 2020 12:10:15 -0400 Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 422D0C061573 for ; Mon, 24 Aug 2020 09:10:14 -0700 (PDT) Received: by mail-il1-x12f.google.com with SMTP id c6so7690152ilo.13 for ; Mon, 24 Aug 2020 09:10:14 -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=3pzbp0PP4PMvyJugAnN/gepU4JOhwH7NND7Nn+BHOo8=; b=0YBJsNOroablrcRGaBM1rlBPIAuaasJIssnBGCPH6WUDbPPFYR/p+8GgvC2qugu4p/ xUPbXCAM5FgGc3BB/HDZYbSOdXxR1nF6tgOlUtRkIp47UA8R2gYTQbk4TWJzc0Q7upGY XlZMeEbMJB494ctnjftTJCZOQOSdmYHxk/bCAZW3aogQ4KFMpY94zVJxdzkfYe6DWuiT 3du4OM5NzQRHPYLNVZNp7KOvm90a3QU9NcRzZC0xQrto1ZEdCfIo1TyCK05BwkiM0oJd LyGtOTDkNbvg6fpPdvgaL2u0r2CvKrf/QXWFZdoBcuNX0aat4t2/nNXKExN1uET0cf9h fOXw== 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=3pzbp0PP4PMvyJugAnN/gepU4JOhwH7NND7Nn+BHOo8=; b=desVCEakdlc/e31Kuf6jh+gtdrIAn38qazYVrh03ZxPsbPMVtoRcQNOSMWJt2FFswY qyFOonQUkbWXSvaaRx+NZLYm21Fb2pwOolA4hvv79uoUpSSqSNn2ExVFwWWNdSZRPP0E LcIPJ55sqtNQ7L6yaXvBbscS8qeLKNRCcCJX5YWNUb/DU94SGv4xGU5mZagFkUMRiNgD /VuHiHOn5qXpf3qqICBK6YLlnGSMCLoA31AiOvjQejTSPM4Hv4gHh6oH01KI3TH1yJkm ja0pB4o59cEoJbS+Q6ZgviJJalh4tgss8tOc2BGJDwgqDVbZU8pfVfBwLk/idyRYrc3b LWjg== X-Gm-Message-State: AOAM532OSm0I0ECiKHXKKY9QxXPA8CVFgLf8u67zTH8y5ImpX/mimfZn 3mP2t/4J1pQQNJIJ3zQPTSMoTh1dKjLapxZH X-Google-Smtp-Source: ABdhPJx+79VkkUx0zDf+Wpwf0LcIE4bZw8pPunEBTZ/wqT3mPahbLawE2MvOueQ+39Ti+/3VQpNtbA== X-Received: by 2002:a92:c8c1:: with SMTP id c1mr5579965ilq.42.1598285403807; Mon, 24 Aug 2020 09:10:03 -0700 (PDT) Received: from [192.168.1.58] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id e1sm7410355ilq.40.2020.08.24.09.10.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Aug 2020 09:10:03 -0700 (PDT) Subject: Re: Large number of empty reads on 5.9-rc2 under moderate load To: Dmitry Shulyak Cc: io-uring@vger.kernel.org References: <7a148c5e-4403-9c8e-cc08-98cd552a7322@kernel.dk> <06d07d6c-3e91-b2a7-7e03-f6390e787085@kernel.dk> From: Jens Axboe Message-ID: <282f1b86-0cf3-dd8d-911f-813d3db44352@kernel.dk> Date: Mon, 24 Aug 2020 10:10:02 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: io-uring-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On 8/24/20 9:33 AM, Dmitry Shulyak wrote: > On Mon, 24 Aug 2020 at 17:45, Jens Axboe wrote: >> >> On 8/24/20 8:06 AM, Jens Axboe wrote: >>> On 8/24/20 5:09 AM, Dmitry Shulyak wrote: >>>> library that i am using https://github.com/dshulyak/uring >>>> It requires golang 1.14, if installed, benchmark can be run with: >>>> go test ./fs -run=xx -bench=BenchmarkReadAt/uring_8 -benchtime=1000000x >>>> go test ./fs -run=xx -bench=BenchmarkReadAt/uring_5 -benchtime=8000000x >>>> >>>> note that it will setup uring instance per cpu, with shared worker pool. >>>> it will take me too much time to implement repro in c, but in general >>>> i am simply submitting multiple concurrent >>>> read requests and watching read rate. >>> >>> I'm fine with trying your Go version, but I can into a bit of trouble: >>> >>> axboe@amd ~/g/go-uring (master)> >>> go test ./fs -run=xx -bench=BenchmarkReadAt/uring_8 -benchtime=1000000x >>> # github.com/dshulyak/uring/fixed >>> fixed/allocator.go:38:48: error: incompatible type for field 2 in struct construction (cannot use type uint64 as type syscall.Iovec_len_t) >>> 38 | iovec := []syscall.Iovec{{Base: &mem[0], Len: uint64(size)}} >>> | ^ >>> FAIL github.com/dshulyak/uring/fs [build failed] >>> FAIL >>> axboe@amd ~/g/go-uring (master)> go version >>> go version go1.14.6 gccgo (Ubuntu 10.2.0-5ubuntu1~20.04) 10.2.0 linux/amd64 >> >> Alright, got it working. What device are you running this on? And am I >> correct in assuming you get short reads, or rather 0 reads? What file >> system? > > Was going to look into this. > I am getting 0 reads. This is on some old kingston ssd, ext4. I can't seem to reproduce this. I do see some cqe->res == 0 completes, but those appear to be NOPs. And they trigger at the start and end. I'll keep poking. -- Jens Axboe