From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjKCQ-0003hn-4R for qemu-devel@nongnu.org; Mon, 12 Sep 2016 01:54:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjKCM-0004gD-0G for qemu-devel@nongnu.org; Mon, 12 Sep 2016 01:54:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjKCL-0004g3-RW for qemu-devel@nongnu.org; Mon, 12 Sep 2016 01:54:29 -0400 Date: Mon, 12 Sep 2016 13:54:24 +0800 From: Peter Xu Message-ID: <20160912055424.GD3776@pxdev.xzpeter.org> References: <1473226344-28520-1-git-send-email-peterx@redhat.com> <1473226344-28520-3-git-send-email-peterx@redhat.com> <20160907060550.GQ2780@voom.fritz.box> <20160908102240.GD28348@pxdev.xzpeter.org> <20160912011737.GB12621@voom.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160912011737.GB12621@voom.fritz.box> Subject: Re: [Qemu-devel] [PATCH v3 2/3] memory: generalize iommu_ops.notify_started to notifier_add List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: Paolo Bonzini , qemu-devel@nongnu.org, mst@redhat.com, jasowang@redhat.com, vkaplans@redhat.com, alex.williamson@redhat.com, wexu@redhat.com, cornelia.huck@de.ibm.com, dgibson@redhat.com On Mon, Sep 12, 2016 at 11:17:37AM +1000, David Gibson wrote: [...] > > I think now I understand the point... Then I'd prefer to use David's > > suggestion. A single notify_changed() looks cleaner. To be more > > explicit, I would prefer to rename it to notifier_flag_changed(), > > since notify_changed() looks like to be called every time notifier > > list changed, but actually it is for monitoring the flags. > > That sounds reasonable. I think notifier_flag_changed() should be > passed both the old and new flags, to save the backend having to keep > track of the old ones - which flags have changed might affect what the > callback needs to do. Agree. That's exactly what v4 was doing. Thanks, -- peterx