Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp685224img; Mon, 18 Mar 2019 11:55:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAbXjx5t2Nn6OaYq06N1upkeJL9zonzU180Gxz2W+NycDTXM+dDVyb7gRgmIltAcVdKNdR X-Received: by 2002:a63:e113:: with SMTP id z19mr6524542pgh.87.1552935345749; Mon, 18 Mar 2019 11:55:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552935345; cv=none; d=google.com; s=arc-20160816; b=h2+Rwd12GsREtz1ILP6B29UJlWfIp/O2qind+v7IhqxerxSdObs4oiseAYpim8l7KO Iq6ElgaibNnPHBAnXzuaRf9PF8sBu8FRwdHI6qQTG/HSNgSZz+gKgIPhkEVl6zWCB+2C 70ES5w+rcq1zp5wl0QRVEH0IanDeh6pdrBMPo/FR4kdYn9k6ZEx0TnENi8AeBHp7o/dp zCBcVjSKMMWLs1Zw1/9pCDAEPyftOB23x/ua3v8aF8I7W5/ocXWYAfOji6K9lMEGBXrl TkefDOGxriW82gwubcwYsqaiNzUkr/e+EAGZ56614RJdHEPWk+4+0PIXXgiKQ0OC0VgV 1Ccw== 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=KSRGyI7+eM1gZhlMZ3WRXorgkLgGMvJ0zO1neaVZJ4s=; b=uppgbQlJSa8bjQlUzexbEsvfTu3L1z1vpb2du+gweP0/lXc552xhSpdSkeXXprx5Ih IMuZA21nJA06lORDR14HTcMJIK4HI7FbB8U8pz5VHkzobDDiqk+OduMNQnd5KoHCLAGo cbn5C6iy+CA/KHxDMG/YYKWmSerKl97o935z9trBMEg3E1m7aJODxYCvAZC5vrgKEihQ G1xOzcvIj3mr/PdVSnkgZv5IYjlBx1J+15HUqZhCYL1zrEdypgquM0dgCsHwina9EgJb 2AuA4WcOkx+WD+M0Wf3FHDQI8Z+JzsgaLU2Lk3c/duMRdzrxdT4Leal20H5chRvRhFP+ gtNw== 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 d10si9357285pgq.133.2019.03.18.11.55.29; Mon, 18 Mar 2019 11:55:45 -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 S1727118AbfCRSym (ORCPT + 99 others); Mon, 18 Mar 2019 14:54:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7409 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726812AbfCRSyl (ORCPT ); Mon, 18 Mar 2019 14:54:41 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 16C704E92A; Mon, 18 Mar 2019 18:54:41 +0000 (UTC) Received: from redhat.com (unknown [10.20.6.236]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C4DE25DD97; Mon, 18 Mar 2019 18:54:39 +0000 (UTC) Date: Mon, 18 Mar 2019 14:54:38 -0400 From: Jerome Glisse To: Dan Williams Cc: Andrew Morton , Linux MM , Linux Kernel Mailing List , Felix Kuehling , Christian =?iso-8859-1?Q?K=F6nig?= , Ralph Campbell , John Hubbard , Jason Gunthorpe Subject: Re: [PATCH 00/10] HMM updates for 5.1 Message-ID: <20190318185437.GB6786@redhat.com> References: <20190129165428.3931-1-jglisse@redhat.com> <20190313012706.GB3402@redhat.com> <20190313091004.b748502871ba0aa839b924e9@linux-foundation.org> <20190318170404.GA6786@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.0 (2018-05-17) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 18 Mar 2019 18:54:41 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 18, 2019 at 11:30:15AM -0700, Dan Williams wrote: > On Mon, Mar 18, 2019 at 10:04 AM Jerome Glisse wrote: > > > > On Wed, Mar 13, 2019 at 09:10:04AM -0700, Andrew Morton wrote: > > > On Tue, 12 Mar 2019 21:27:06 -0400 Jerome Glisse wrote: > > > > > > > Andrew you will not be pushing this patchset in 5.1 ? > > > > > > I'd like to. It sounds like we're converging on a plan. > > > > > > It would be good to hear more from the driver developers who will be > > > consuming these new features - links to patchsets, review feedback, > > > etc. Which individuals should we be asking? Felix, Christian and > > > Jason, perhaps? > > > > > > > So i am guessing you will not send this to Linus ? Should i repost ? > > This patchset has 2 sides, first side is just reworking the HMM API > > to make something better in respect to process lifetime. AMD folks > > did find that helpful [1]. This rework is also necessary to ease up > > the convertion of ODP to HMM [2] and Jason already said that he is > > interested in seing that happening [3]. By missing 5.1 it means now > > that i can not push ODP to HMM in 5.2 and it will be postpone to 5.3 > > which is also postoning other work ... > > > > The second side is it adds 2 new helper dma map and dma unmap both > > are gonna be use by ODP and latter by nouveau (after some other > > nouveau changes are done). This new functions just do dma_map ie: > > hmm_dma_map() { > > existing_hmm_api() > > for_each_page() { > > dma_map_page() > > } > > } > > > > Do you want to see anymore justification than that ? > > Yes, why does hmm needs its own dma mapping apis? It seems to > perpetuate the perception that hmm is something bolted onto the side > of the core-mm rather than a native capability. Seriously ? Kernel is fill with example where common code pattern that are not device specific are turn into helpers and here this is exactly what it is. A common pattern that all device driver will do which is turn into a common helper. Moreover this allow to share the same error code handling accross driver when mapping one page fails. So this avoid the needs to duplicate same boiler plate code accross different drivers. Is code factorization not a good thing ? Should i duplicate every- thing in every single driver ? If that's not enough, this will also allow to handle peer to peer and i posted patches for that [1] and again this is to avoid duplicating common code accross different drivers. It does feel that you oppose everything with HMM in its name just because you do not like it. It is your prerogative to not like some- thing but you should propose something that achieve the same result instead of constantly questioning every single comma. Cheers, J?r?me [1] https://lwn.net/ml/linux-kernel/20190129174728.6430-1-jglisse@redhat.com/