Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp1080978ybb; Thu, 28 Mar 2019 19:23:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqywF6GeKVF7WYsbaCEav1XvPzG4uYIA3/+CKmIHxsH1NC9lwQjOlxBAPVBaEW5KcnjaSn7M X-Received: by 2002:a65:50c4:: with SMTP id s4mr2718994pgp.33.1553826193605; Thu, 28 Mar 2019 19:23:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553826193; cv=none; d=google.com; s=arc-20160816; b=odTtXpk16JuR56jjHmBS4VG8sFK6NgzW6+kmFEQNURvn+LUMLBH7cMpjm/USReLRe+ ctGTIf6885H6X1GVuKMehnzctMsUCakF2DPC4G3L6BtxeD2X8ldi9WFgimaWKC/+J4E0 0Ie2tR1rZIMTQMJD03gOkdTd44btxxGW90R/4I02ILvIhozjvTPT/MVCfAamzkJKtwVm SmcIN8EbhxY8f4L+8m4yuAvI7DliVqcWPpNvQnyKUOrXFkvQjN97cj0bYm393rWGq5K0 Nf8qzzQCjjGRmibhmy9QSMlEWb4vLRmCrpBzHXvYeBbn+NIhNZnPX8tELFZFdXWZ9xAg 65sA== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=/zDbOYGR3XfuZafIc7736W9toPpHSVSyCIewvBqysyg=; b=WYl0mYsDpluHu+O7TR80mlOh+Wulf+NHRrVShPV8aZmBSLvUKtrSterHMNPjmmyZG+ Jnk1bg3vPCU0MKRGMbhK/UoJuGQFEalddJgDCFz4Cmgp7C9CMUMLpq55EmjsdYv/MdkV P7ZzriqvPcapxPvBpoXUCgQ9IpK8qBLb/XljlATIrAOsCsqyNf5Gr+5R8fB6ifO1RkGS gOqwdBYHwEHYcVh64rMRsKpNc6oZdFGQSgjYubnfFO3yAvdW5MxxJlxIwP3MWt+/GFZi 6/BVkxWhnHkhZ5zpFVuA0O06mYM4hW2WTFj4s9HCEdX8ueyBm4q4IgH/VWfsg7+Llndx xp1g== 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 c10si646704pfg.172.2019.03.28.19.22.57; Thu, 28 Mar 2019 19:23:13 -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 S1728558AbfC2CWW (ORCPT + 99 others); Thu, 28 Mar 2019 22:22:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38706 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728022AbfC2CWV (ORCPT ); Thu, 28 Mar 2019 22:22:21 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 62D5F307D85E; Fri, 29 Mar 2019 02:22:21 +0000 (UTC) Received: from redhat.com (ovpn-121-118.rdu2.redhat.com [10.10.121.118]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 599DD6E40B; Fri, 29 Mar 2019 02:22:20 +0000 (UTC) Date: Thu, 28 Mar 2019 22:22:18 -0400 From: Jerome Glisse To: John Hubbard Cc: Ira Weiny , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Dan Williams Subject: Re: [PATCH v2 02/11] mm/hmm: use reference counting for HMM struct v2 Message-ID: <20190329022217.GI16680@redhat.com> References: <20190328110719.GA31324@iweiny-DESK2.sc.intel.com> <20190328191122.GA5740@redhat.com> <20190328212145.GA13560@redhat.com> <20190328165708.GH31324@iweiny-DESK2.sc.intel.com> <20190329010059.GB16680@redhat.com> <55dd8607-c91b-12ab-e6d7-adfe6d9cb5e2@nvidia.com> <20190329015003.GE16680@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Fri, 29 Mar 2019 02:22:21 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 28, 2019 at 07:11:17PM -0700, John Hubbard wrote: > On 3/28/19 6:50 PM, Jerome Glisse wrote: > [...] > >>> > >>> The hmm_put() is just releasing the reference on the hmm struct. > >>> > >>> Here i feel i am getting contradicting requirement from different people. > >>> I don't think there is a way to please everyone here. > >>> > >> > >> That's not a true conflict: you're comparing your actual implementation > >> to Ira's request, rather than comparing my request to Ira's request. > >> > >> I think there's a way forward. Ira and I are actually both asking for the > >> same thing: > >> > >> a) clear, concise get/put routines > >> > >> b) avoiding odd side effects in functions that have one name, but do > >> additional surprising things. > > > > Please show me code because i do not see any other way to do it then > > how i did. > > > > Sure, I'll take a run at it. I've driven you crazy enough with the naming > today, it's time to back it up with actual code. :) Note that every single line in mm_get_hmm() do matter. > I hope this is not one of those "we must also change Nouveau in N+M steps" > situations, though. I'm starting to despair about reviewing code that > basically can't be changed... It can be change but i rather not do too many in one go, each change is like a tango with one partner and having tango with multiple partner at once is painful much more likely to step on each other foot. Cheers, J?r?me