From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9895AC0044D for ; Mon, 16 Mar 2020 13:12:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4744C2051A for ; Mon, 16 Mar 2020 13:12:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4744C2051A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B333B6B0003; Mon, 16 Mar 2020 09:12:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AE2E96B0005; Mon, 16 Mar 2020 09:12:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A20416B0007; Mon, 16 Mar 2020 09:12:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0236.hostedemail.com [216.40.44.236]) by kanga.kvack.org (Postfix) with ESMTP id 8D9E36B0003 for ; Mon, 16 Mar 2020 09:12:05 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 55E878798 for ; Mon, 16 Mar 2020 13:12:05 +0000 (UTC) X-FDA: 76601263410.28.toy34_2f4b556582209 X-HE-Tag: toy34_2f4b556582209 X-Filterd-Recvd-Size: 2165 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Mon, 16 Mar 2020 13:12:04 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 5DFD568CEC; Mon, 16 Mar 2020 14:12:02 +0100 (CET) Date: Mon, 16 Mar 2020 14:12:01 +0100 From: Christoph Hellwig To: Jason Gunthorpe Cc: Christoph Hellwig , Jerome Glisse , Ralph Campbell , Felix.Kuehling@amd.com, linux-mm@kvack.org, John Hubbard , dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, Philip Yang Subject: Re: [PATCH hmm 8/8] mm/hmm: add missing call to hmm_pte_need_fault in HMM_PFN_SPECIAL handling Message-ID: <20200316131201.GA17955@lst.de> References: <20200311183506.3997-1-jgg@ziepe.ca> <20200311183506.3997-9-jgg@ziepe.ca> <20200316091347.GH12439@lst.de> <20200316121053.GP13183@mellanox.com> <20200316124953.GC17386@lst.de> <20200316130458.GQ13183@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200316130458.GQ13183@mellanox.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Mar 16, 2020 at 10:04:58AM -0300, Jason Gunthorpe wrote: > > Ok. I had some cleanups like this based of older trees, but if you are > > active in this area I think I'll let you handle it. > > You once said you wanted to loose the weird pfn flags scheme, so > before putting hmm_range_fault in ODP I planned to do that. > > If you have your series someplace send me a URL and I'll look on it I have a local branch I just started hacking on, but it is rather broken based on various discussions we had. But for a basic one I'd suggest something like: - kill HMM_PFN_SPECIAL as it serves no purpose - split the ->pfns array into an input flags (optional) and an output pfn (mandtory) one, using new flags for the input side - replace the output flags/values indirection with a bunch of values encoded in the high bits of a u64, with the rest used for the pfn