Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp197210yba; Fri, 12 Apr 2019 01:34:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFvsfNxnMXrWYcqQ5BW+XjjboKyGWq7UoK9oXsyDyi1hPf/Ql06GMB3MwmhmfaIJg1/6/F X-Received: by 2002:aa7:9095:: with SMTP id i21mr55001711pfa.134.1555058082175; Fri, 12 Apr 2019 01:34:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555058082; cv=none; d=google.com; s=arc-20160816; b=kWWPQavv1LeGxoYsPoL1+p0fstB/ZDrRUVaanFv+e9rNimM7STFxfJHeRENEwA/WpM xoFBd/O+x7k3F/dxaTkzKjEyxst6b31/CAFS4JzoE0lYej6RoSEkFEWMFzy8LT1X5rIT 2ULTl2naga+91vzBAwWqDgh8H8xWlSE/fwo0VbamiXI5bmqxxAtDqT7m+qkewh2l/Yb4 IpK6QzGmJXAcxCdWT5KfJPJ92q1p6bXK+0xTprCY9SRdb2pZf8/2kGKar2FSV1T8AxYf h2jaLobhGovfyOZx3hsy/KSbSuN/2ZWwUKJJXVW8xlCRTaH91J5NR/I5j1Ipxu6z2n/9 ofIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=yMomBNx/u/jlIM4gtigVE6LUs4h6TfeHTWMVvoZ4qt0=; b=SKuQahoxQw+O/ouQ8Y4q+4mESyotyyCz9sEGYfR5rRCZWwjZ5Ymp7RB1bqLiu3zGNd REcH78VdyXn1NcIfshymzRclkdE/9AQRv2Unpl14IbFKpSGk80NoDxQ/qDkltCz4nZbg pKLakerN4QdDR2KaSkQy4tLF7ynz7MiHB1qKKIMaF0d4jBgaUlXKWaEAkL9O24KdZQOJ 0iaiVyPPUsQxzec4qBiOzZnCpJQPGQwaSdKvYtXRf+ly89+gjV+pupavR1csycwJ7DZa 5oI6Hu6WW9f6IjEo4Ls5upsOQTAo/YRH0M+5tjyJlSaayGJGOpxDs9ewCwapkZOxpXCT GNxQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j16si36392060pll.291.2019.04.12.01.34.26; Fri, 12 Apr 2019 01:34:42 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727372AbfDLIce (ORCPT + 99 others); Fri, 12 Apr 2019 04:32:34 -0400 Received: from mx2.suse.de ([195.135.220.15]:52270 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725973AbfDLIce (ORCPT ); Fri, 12 Apr 2019 04:32:34 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A5FDCAECB; Fri, 12 Apr 2019 08:32:31 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id EBF6F1E429B; Fri, 12 Apr 2019 10:32:30 +0200 (CEST) Date: Fri, 12 Apr 2019 10:32:30 +0200 From: Jan Kara To: Dan Williams Cc: Pankaj Gupta , linux-nvdimm , Linux Kernel Mailing List , virtualization@lists.linux-foundation.org, KVM list , linux-fsdevel , Linux ACPI , Qemu Developers , linux-ext4 , linux-xfs , Ross Zwisler , Vishal L Verma , Dave Jiang , "Michael S. Tsirkin" , Jason Wang , Matthew Wilcox , "Rafael J. Wysocki" , Christoph Hellwig , Len Brown , Jan Kara , Theodore Ts'o , Andreas Dilger , "Darrick J. Wong" , lcapitulino@redhat.com, Kevin Wolf , Igor Mammedov , jmoyer , Nitesh Narayan Lal , Rik van Riel , Stefan Hajnoczi , Andrea Arcangeli , David Hildenbrand , david , cohuck@redhat.com, Xiao Guangrong , Paolo Bonzini , kilobyte@angband.pl, yuval.shaia@oracle.com Subject: Re: [PATCH v5 1/6] libnvdimm: nd_region flush callback support Message-ID: <20190412083230.GA29850@quack2.suse.cz> References: <20190410040826.24371-1-pagupta@redhat.com> <20190410040826.24371-2-pagupta@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Honza -- Jan Kara SUSE Labs, CR