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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 209EDC43334 for ; Fri, 1 Jul 2022 18:14:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7FFEE6B0071; Fri, 1 Jul 2022 14:14:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 789826B0073; Fri, 1 Jul 2022 14:14:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6505F6B0074; Fri, 1 Jul 2022 14:14:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 51C9F6B0071 for ; Fri, 1 Jul 2022 14:14:45 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 2BFF7120199 for ; Fri, 1 Jul 2022 18:14:45 +0000 (UTC) X-FDA: 79639331730.23.2EB46D3 Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by imf22.hostedemail.com (Postfix) with ESMTP id 5BF6BC0009 for ; Fri, 1 Jul 2022 18:14:44 +0000 (UTC) Received: by mail-pg1-f179.google.com with SMTP id 23so3079664pgc.8 for ; Fri, 01 Jul 2022 11:14:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20210112.gappssmtp.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=+2cjOm2iV0K6Fh37ckIuAiSPC7PAkAib0BkzJQTS0+s=; b=37Z/LMNRq6UGadaXxmJOSRipY4rroGzOo3QgmZRy2ucWwXpMiTrzuNd7EEp6pNoJax HTUCYoauubMAVWuf0R7SarFV5P4ZeO6qr8rm6ZPPt7kXiv0Hc4gW6JPonc6R2CUXKDW3 hia5chKFOpdKMVjQ4lt/qFB8M+n0QeL5Fd2+/U+gLUZS5HKYBcVwkdM+A9swXyCWtD8P WQYLl3mtwqddkRd2iTE5dmwr07p3swYcSVXbbnRgv8fhtwiVdJYUgQRJ5zfW1uHMtr7D hgtuffkm4EVCOvEV1wUjpqBpUZxmxHoFjlagIe2taAsHlfCPaj6Z/Yr6V24EwTXdr2e1 phPw== 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=+2cjOm2iV0K6Fh37ckIuAiSPC7PAkAib0BkzJQTS0+s=; b=yENr44FHVzfOybOzzDXD3lUL1Zbk90WffNZDI0OHGZL0ZB4clJVQzIpa9LAmm50NSh HoHWt3xWGiMKeVxw/Nb7PBIsMMZXlXyn61V+6p82LyC4kOzFg4Zbn9SuQcNaVzzPQ+10 n2BfbfDC9EGyEMm5BxLy093jWVO1HzAXVJisrH5NcSf7spPJENe7u+XBPEqVydXVGlUD hez01ciptWsch7T1f8oi4xPJHH7RzA0KvdLasbEYQbWdHaB/76mCeaUetvl/ClYQTRhm HCvGsfVb1lgvQidQKqhRUDridQRX3VuIgCmoWQTB1x4zN1SbTc8By3MBGwpd3evYg/vX XZkw== X-Gm-Message-State: AJIora8oV/kvuU/XOcGCbP0lEg2zUm9gZTeFp8qn330xDA0saykh3cfz Y3lmHd3Rwk+TO2jkxNTXWP5R1Q== X-Google-Smtp-Source: AGRyM1tgpHo+10wcI7TOf9FXHzT5lkC3dyL+mkSzScOZoo+gMDXmGOW87BcbBjT7laY527aiFmqxcQ== X-Received: by 2002:a05:6a00:26cf:b0:4f6:fc52:7b6a with SMTP id p15-20020a056a0026cf00b004f6fc527b6amr21371577pfw.39.1656699283240; Fri, 01 Jul 2022 11:14:43 -0700 (PDT) Received: from [192.168.1.100] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id h5-20020a170902680500b0015e8d4eb20dsm16065865plk.87.2022.07.01.11.14.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Jul 2022 11:14:42 -0700 (PDT) Message-ID: <47dd9e6a-4e08-e562-12ff-5450fc42da77@kernel.dk> Date: Fri, 1 Jul 2022 12:14:41 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v7 15/15] xfs: Add async buffered write support Content-Language: en-US To: "Darrick J. Wong" Cc: Al Viro , Stefan Roesch , io-uring@vger.kernel.org, kernel-team@fb.com, linux-mm@kvack.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, david@fromorbit.com, jack@suse.cz, hch@infradead.org, Christoph Hellwig References: <20220601210141.3773402-1-shr@fb.com> <20220601210141.3773402-16-shr@fb.com> <0a75a0c4-e2e5-b403-27bc-e43872fecdc1@kernel.dk> From: Jens Axboe In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656699284; a=rsa-sha256; cv=none; b=fHkrYz+rF6CEFF9XmgWvoD8gd/tK8zRYE/MFdu3qzBcUNPQY9slUGQK99oCI8skg1dVfeN fhPXNNTNKlR/yWE8PuvVuZuAF8E1oXuTDg1f7hqwYv+Vu0SKenT5H/og5JAb59MiPhyxjs M3y9RyAgmwzhVkMmi0IF9JX789bKquM= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b="37Z/LMNR"; dmarc=none; spf=pass (imf22.hostedemail.com: domain of axboe@kernel.dk designates 209.85.215.179 as permitted sender) smtp.mailfrom=axboe@kernel.dk ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656699284; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=+2cjOm2iV0K6Fh37ckIuAiSPC7PAkAib0BkzJQTS0+s=; b=xddmHP553TdByjvaRY8CqLoIYWm+psHNW9dGQh0QZ8Ns1Bu4d7rgdXMSfhdeRu2oxGDjwm k+kNZXdUhY8cwl8EcKfIvQJmxjmblDAJ9FTPKABU3rbcQh27GSfsSB2Zrwrnmbtk5FcGeE U6h3x9Ym2kmABM4460kqxusccegbouI= X-Rspamd-Queue-Id: 5BF6BC0009 X-Rspam-User: Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=kernel-dk.20210112.gappssmtp.com header.s=20210112 header.b="37Z/LMNR"; dmarc=none; spf=pass (imf22.hostedemail.com: domain of axboe@kernel.dk designates 209.85.215.179 as permitted sender) smtp.mailfrom=axboe@kernel.dk X-Rspamd-Server: rspam02 X-Stat-Signature: orsjtxh3qibxt5bjy1hsppryz77w39n8 X-HE-Tag: 1656699284-671930 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 7/1/22 12:05 PM, Darrick J. Wong wrote: > On Fri, Jul 01, 2022 at 08:38:07AM -0600, Jens Axboe wrote: >> On 7/1/22 8:30 AM, Jens Axboe wrote: >>> On 7/1/22 8:19 AM, Jens Axboe wrote: >>>> On 6/30/22 10:39 PM, Al Viro wrote: >>>>> On Wed, Jun 01, 2022 at 02:01:41PM -0700, Stefan Roesch wrote: >>>>>> This adds the async buffered write support to XFS. For async buffered >>>>>> write requests, the request will return -EAGAIN if the ilock cannot be >>>>>> obtained immediately. >>>>> >>>>> breaks generic/471... >>>> >>>> That test case is odd, because it makes some weird assumptions about >>>> what RWF_NOWAIT means. Most notably that it makes it mean if we should >>>> instantiate blocks or not. Where did those assumed semantics come from? >>>> On the read side, we have clearly documented that it should "not wait >>>> for data which is not immediately available". >>>> >>>> Now it is possible that we're returning a spurious -EAGAIN here when we >>>> should not be. And that would be a bug imho. I'll dig in and see what's >>>> going on. >>> >>> This is the timestamp update that needs doing which will now return >>> -EAGAIN if IOCB_NOWAIT is set as it may block. >>> >>> I do wonder if we should just allow inode time updates with IOCB_NOWAIT, >>> even on the io_uring side. Either that, or passed in RWF_NOWAIT >>> semantics don't map completely to internal IOCB_NOWAIT semantics. At >>> least in terms of what generic/471 is doing, but I'm not sure who came >>> up with that and if it's established semantics or just some made up ones >>> from whomever wrote that test. I don't think they make any sense, to be >>> honest. >> >> Further support that generic/471 is just randomly made up semantics, >> it needs to special case btrfs with nocow or you'd get -EAGAIN anyway >> for that test. >> >> And it's relying on some random timing to see if this works. I really >> think that test case is just hot garbage, and doesn't test anything >> meaningful. > > I had thought that NOWAIT means "don't wait for *any*thing", > which would include timestamp updates... but then I've never been all > that clear on what specifically NOWAIT will and won't wait for. :/ Agree, at least the read semantics (kind of) make sense, but the ones seemingly made up by generic/471 don't seem to make any sense at all. -- Jens Axboe