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=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no 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 6123EC432C0 for ; Thu, 21 Nov 2019 08:02:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 35B5820872 for ; Thu, 21 Nov 2019 08:02:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="M/BxHV9M" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726775AbfKUICD (ORCPT ); Thu, 21 Nov 2019 03:02:03 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:33617 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726358AbfKUICD (ORCPT ); Thu, 21 Nov 2019 03:02:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574323322; h=from:from: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; bh=mG0FHW0fig4Cx/LxAaJLR6J3VqDT9J+mhAWOfYVykWs=; b=M/BxHV9MEmk+gkhq8PlUSFXybhegVDOwzS6YMLHmbbxGpTLlNaX2b/P8YOkXHJaiseT6Nw PqiAltKhhfmZA+ltywuW0U4hovVizkkYUZrVED+8/XTE2b1nx6L14I142IKt5dj5kEWcg+ NfrXnjS1px0UtRCO8cHHdEtzaOtWMd4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-380-g80Ev-2mMmmrw3oAT5So1Q-1; Thu, 21 Nov 2019 03:01:58 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C6273801E5D; Thu, 21 Nov 2019 08:01:56 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B7AEC692BE; Thu, 21 Nov 2019 08:01:56 +0000 (UTC) Received: from zmail21.collab.prod.int.phx2.redhat.com (zmail21.collab.prod.int.phx2.redhat.com [10.5.83.24]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8F4591809563; Thu, 21 Nov 2019 08:01:56 +0000 (UTC) Date: Thu, 21 Nov 2019 03:01:56 -0500 (EST) From: Pankaj Gupta To: Dan Williams Cc: Jeff Moyer , linux-nvdimm , Linux Kernel Mailing List , Linux ACPI , Vishal L Verma , Dave Jiang , Ira Weiny , "Rafael J. Wysocki" , Len Brown , Vivek Goyal , Keith Busch Message-ID: <2089367516.35808121.1574323316486.JavaMail.zimbra@redhat.com> In-Reply-To: References: <20191120092831.6198-1-pagupta@redhat.com> Subject: Re: [PATCH] virtio pmem: fix async flush ordering MIME-Version: 1.0 X-Originating-IP: [10.67.116.169, 10.4.195.1] Thread-Topic: virtio pmem: fix async flush ordering Thread-Index: n73vjZWQN2B3un3TvjjmhkQyzbgvzg== X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: g80Ev-2mMmmrw3oAT5So1Q-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > > > Remove logic to create child bio in the async flush function which > > > causes child bio to get executed after parent bio 'pmem_make_request= ' > > > completes. This resulted in wrong ordering of REQ_PREFLUSH with the > > > data write request. > > > > > > Instead we are performing flush from the parent bio to maintain the > > > correct order. Also, returning from function 'pmem_make_request' if > > > REQ_PREFLUSH returns an error. > > > > > > Reported-by: Jeff Moyer > > > Signed-off-by: Pankaj Gupta > > > > There's a slight change in behavior for the error path in the > > virtio_pmem driver. Previously, all errors from virtio_pmem_flush were > > converted to -EIO. Now, they are reported as-is. I think this is > > actually an improvement. > > > > I'll also note that the current behavior can result in data corruption, > > so this should be tagged for stable. >=20 > I added that and was about to push this out, but what about the fact > that now the guest will synchronously wait for flushing to occur. The > goal of the child bio was to allow that to be an I/O wait with > overlapping I/O, or at least not blocking the submission thread. Does > the block layer synchronously wait for PREFLUSH requests? If not I > think a synchronous wait is going to be a significant performance > regression. Are there any numbers to accompany this change? My bad, I missed this point completely. Thanks, Pankaj >=20 >=20