Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2188338ybg; Fri, 5 Jun 2020 07:45:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVRTHanVgp926KZWINZrbSxQU6/Oia2hxvEqhDViCk/oC1EHnSGw4zCZ9ccpMnRCBl/qLh X-Received: by 2002:a17:906:b88d:: with SMTP id hb13mr9343524ejb.96.1591368300728; Fri, 05 Jun 2020 07:45:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591368300; cv=none; d=google.com; s=arc-20160816; b=oo+T7Ai1wM2Bxq+CEJ7WSLoTG4c8JM3oc9mPSLEiga0HMseQzVi9XyIsHt38L5H+Vb 7xohVR20PXIJKjLm6zMsfanywCUsg2DGs+aSXA0wPTmSS1Dgyjz9lLsh4Dpx8WJfW6i2 jFKi/HbSAMp8bhEgOg/uTM42kUSHsupjrwQKmq5fDx26N6PbTQBP7oLJ3eruC74d1h2r cMuVAmAuVOeFnetAwLi0ElsVAHxG0+weUWNzF/ulcgVzTMAxbHGjJMVXj9Kl/4EDiybp U92CogThYQCXbQZm77uodYYtkciq/QxzVaSowama0Th3pjxHeRW5EaUgEU6g0jDrPnjH ePNA== 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:references:cc:to:from:subject:dkim-signature; bh=kWmWY107rL+xsIIhFUjNTUmeVB4+7Mb6mUCJ2bTAek8=; b=pH8yTbgVDRWXTTmnvzAC0z7614ruLl2gU1mvnZnlaGczP++LBnR7oYQ8bLQdndPjP4 5uN1DR7TyY6lvvBQPJCEdD9ekE8/mJRjbWLb4ZS8gRxx+9H9aJxcMZyOja5EvyITJqAj KU+sRGjW+XmifzEztZ8+YjbNvHPEtCFxGoe6OHDxau3CIua0HYuDmvPrCERa/T2CGRYw OX+tO7rCtkmW5frdOz4mnOpnsc2QiUQ2NZZNlgqF4LJtFyEqT3D32WYMJEjKH3SJm/VG xYHLa3DIcb+Moj/61rNMpua4jatjVy4DO/Hh8N42OICklOMSwB2VuejD2JkubKHXBNMl 6pxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=FsGe7wFG; 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 s9si3775376edx.608.2020.06.05.07.44.37; Fri, 05 Jun 2020 07:45:00 -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=FsGe7wFG; 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 S1728253AbgFEOmd (ORCPT + 99 others); Fri, 5 Jun 2020 10:42:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728007AbgFEOmc (ORCPT ); Fri, 5 Jun 2020 10:42:32 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D293C08C5C3 for ; Fri, 5 Jun 2020 07:42:32 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id d8so531955plo.12 for ; Fri, 05 Jun 2020 07:42:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=kWmWY107rL+xsIIhFUjNTUmeVB4+7Mb6mUCJ2bTAek8=; b=FsGe7wFGGdfMO+60vFghW/jiJzjC8SSJ0pZqzQMAvVGM9/qniaAF8MHtnRHnEEhwwF Su8K2GDWr9oGUbLOg5DXBFZ5oFEvb0od59O261yqszT8OIP9HJE34svYuegmLhXPu/Zo 976f8IDLVPQM/cZLNmCqKN8yfCBrtyF68tIrF54Xq8meZ84YOcEJwuHZk0Ut1NYuVTru 4DqS0Xvb8tP50yNzdLQrOvIdvU+MrBQUPA+XuEBjcFCkUjXt6/IoOGK9/l3cO+cKxmaN XIDG4+iWyGw9+9Or1VhfVJIJ/WXYVBYMM2SGsYNIlCoP8AqbT9kJKlZBxECX9nh+NH7J NK7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kWmWY107rL+xsIIhFUjNTUmeVB4+7Mb6mUCJ2bTAek8=; b=uTG8hfbR1yqtRV47R9hNaLWZdoLZi3BMyvCpkev7zjaxroBqTza6+L3uq8Pm+A7T4k RQmC/1WigJs/HG0zrrN8jLhlS8GXiUa5ysu7MJ+qTxx1ZauA09xdalyP5EU8z0uosBdu rAeCt/IiLsTajrCEsHxj65rI/IEidqiR5jUzDPoa45zFC3LjB5T5oh+qKxowk3DRUsxH Q+Z8YQ1xnqyKXn0UEyBIeNz2iNWr9mez0bbHB2XQI6O/WL0E3dnmp6vqWOe8ANHH1+u6 6OEZvGpJGZ2q42HPTlh6AORTtdNAC5ne4QLoZyBRywxuOSrmf/VSDDN0yc/ptJ5F4sNA hMnA== X-Gm-Message-State: AOAM532zFAcZh3LRErFJGdC6dAQpbqzSccwUl/VCEQRWu6zS+Xtf4Mbb eBTZx5/zGuhgtIyK/YhdO4a5aQ== X-Received: by 2002:a17:90a:df0c:: with SMTP id gp12mr3503128pjb.148.1591368151295; Fri, 05 Jun 2020 07:42:31 -0700 (PDT) Received: from [192.168.1.188] ([66.219.217.173]) by smtp.gmail.com with ESMTPSA id k126sm7788338pfd.129.2020.06.05.07.42.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Jun 2020 07:42:30 -0700 (PDT) Subject: Re: [PATCHSET v5 0/12] Add support for async buffered reads From: Jens Axboe To: Andres Freund Cc: io-uring@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org References: <20200526195123.29053-1-axboe@kernel.dk> <20200604005916.niy2mejjcsx4sv6t@alap3.anarazel.de> Message-ID: <6eeff14f-befc-a5cc-08da-cb77f811fbdf@kernel.dk> Date: Fri, 5 Jun 2020 08:42:28 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 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 6/3/20 7:04 PM, Jens Axboe wrote: > On 6/3/20 6:59 PM, Andres Freund wrote: >> Hi, >> >> I was trying to benchmark the benefits of this for the io_uring using >> postgres I am working on. The initial results where quite promising >> (reducing cpu usage significantly, to lower than non-uring sync io). But >> unfortunately trying another workload triggered both panics and before >> that seemingly returned wrong data. >> >> I first saw that problem with b360d424ce02, which was >> linux-block/async-buffered.6 at the time. After hitting the issue, I >> updated to the current linux-block/async-buffered.6, but the problem >> persists. >> >> The workload that triggers the bug within a few seconds is postgres >> doing a parallel sequential scan of a large table (and aggregating the >> data, but that shouldn't matter). In the triggering case that boils down >> to 9 processes sequentially reading a number of 1GB files (we chunk >> tables internally into smaller files). Each process will read a 512kB >> chunk of the file on its own, and then claim the next 512kB from a >> shared memory location. Most of the IO will be READV requests, reading >> 16 * 8kB into postgres' buffer pool (which may or may not be neighboring >> 8kB pages). > > I'll try and reproduce this, any chance you have a test case that can > be run so I don't have to write one from scratch? The more detailed > instructions the better. Can you try with async-buffered.7? I've rebased it on a new mechanism, and doing something like what you describe above I haven't been able to trigger anything bad. I'd try your test case specifically, so do let know if it's something I can run. -- Jens Axboe