Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp220952yba; Wed, 17 Apr 2019 23:28:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFTgQgZov4HKp5+ikf0/H1bdCl85HErN4b2bj5WkEBON/qXvX+0cy0KfrxQdaZe+gdWfzm X-Received: by 2002:a17:902:988e:: with SMTP id s14mr90392051plp.167.1555568888623; Wed, 17 Apr 2019 23:28:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555568888; cv=none; d=google.com; s=arc-20160816; b=Or2Tn9T4RWycrq3W6/aAmu54Vvw9YiXxvV/H7PdckaVLDu7VRyxIvdwz4tskrGe4/O OwZne4m9PSOY/MbM7G426RsnjsMxZE8jOD5Cq+siWIvUzA1grs19jgoVyGYDDZMgTs7p aRgtLU4YYdKtok4E4MXngLPnnOvcExfbxfoqvC8M1wbWPf0icn8u+/Jzt9iL6IsBwfxK 38QydaoYV5lbF/dOXicdh0MwJMatWakB/ATMHcegC7iftrVEv3Rbl+WlT7hP/pnbucaW AuCPtaF/6GoEUxZbqgwOs4trcuDaNkxNbxcU0Ta90d4f7QKwE2UTAiZbGiHEnlRJomsB ZVuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=9ZzbQ4sSIhBg8Ubmm/rkYioLTsVtXWwyHq7eT31nrC8=; b=oOzczoKRCm0iq2RI0MsDjUa36e/Y7NrfNfHPYWHwZdtsk4vJKKQsDZT7DB8U7TIAgG kQN8uARkuJ0F+CedxM56pEcGxBJ0F9EQ5MMp354uoFtS985MMLOwPKF+SVq9KUi0HsrW /RZMRCdWJdmcFwiVjqOQEqZCn+pT94y+N1slApXpGp/cpcLIWmkLE2GM/U5yLqIxHRl9 d1u0lvlJ/Z8+F9oxViiIyDXmKIrW9WoeyBN5mtQHHjT5zdyM9HJd82HiOQkSNZM0Mu4h Tf1bK/1JjgV4WDKqPu+biWpATf/ifO+hx8kmyWQzD1oMpVHRttFnEmDy27tJZct57td/ YpnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k6si1477001pfc.122.2019.04.17.23.27.53; Wed, 17 Apr 2019 23:28:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388048AbfDRG1E (ORCPT + 99 others); Thu, 18 Apr 2019 02:27:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59990 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725864AbfDRG1D (ORCPT ); Thu, 18 Apr 2019 02:27:03 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A3BA6307D853; Thu, 18 Apr 2019 06:27:02 +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 3C65F60BF7; Thu, 18 Apr 2019 06:27:02 +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 1A4C3181AC43; Thu, 18 Apr 2019 06:27:01 +0000 (UTC) Date: Thu, 18 Apr 2019 02:27:00 -0400 (EDT) From: Pankaj Gupta To: Jeff Moyer , Jan Kara , Dan Williams Cc: cohuck@redhat.com, KVM list , "Michael S. Tsirkin" , Jason Wang , david , Qemu Developers , virtualization@lists.linux-foundation.org, Andreas Dilger , Ross Zwisler , Andrea Arcangeli , Dave Jiang , linux-nvdimm , Vishal L Verma , David Hildenbrand , Matthew Wilcox , Christoph Hellwig , Linux ACPI , linux-ext4 , Len Brown , kilobyte@angband.pl, Rik van Riel , yuval shaia , Stefan Hajnoczi , Paolo Bonzini , lcapitulino@redhat.com, Kevin Wolf , Nitesh Narayan Lal , Theodore Ts'o , Xiao Guangrong , "Darrick J. Wong" , "Rafael J. Wysocki" , Linux Kernel Mailing List , linux-xfs , linux-fsdevel , Igor Mammedov Message-ID: <695036448.22376013.1555568820649.JavaMail.zimbra@redhat.com> In-Reply-To: References: <20190410040826.24371-1-pagupta@redhat.com> <20190410040826.24371-2-pagupta@redhat.com> <20190412083230.GA29850@quack2.suse.cz> Subject: Re: [Qemu-devel] [PATCH v5 1/6] libnvdimm: nd_region flush callback support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.65.16.113, 10.4.195.14] Thread-Topic: libnvdimm: nd_region flush callback support Thread-Index: RQT8Mi0vbK6u7EvKBqBlDf90vecY1Q== X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Thu, 18 Apr 2019 06:27:03 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Thank you for the suggestions on this. > > > On Thu 11-04-19 07:51:48, Dan Williams wrote: > >> On Tue, Apr 9, 2019 at 9:09 PM Pankaj Gupta wrote: > >> > + } else { > >> > + if (nd_region->flush(nd_region)) > >> > + rc = -EIO; > >> > >> Given the common case wants to be fast and synchronous I think we > >> should try to avoid retpoline overhead by default. So something like > >> this: > >> > >> if (nd_region->flush == generic_nvdimm_flush) > >> rc = generic_nvdimm_flush(...); > > > > I'd either add a comment about avoiding retpoline overhead here or just > > make ->flush == NULL mean generic_nvdimm_flush(). Just so that people don't > > get confused by the code. > > Isn't this premature optimization? I really don't like adding things > like this without some numbers to show it's worth it. Can we add the optimization after this version is merged. Best regards, Pankaj > > -Jeff > >