Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1521ybi; Tue, 16 Jul 2019 15:04:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwWUKMNGr3Ssy3ajCYvtEKgaMfFKnF13F2GzyaRdL1tdixDBK5qCT+4UHgqn/MXbDOjk9f0 X-Received: by 2002:a17:902:3341:: with SMTP id a59mr37861896plc.186.1563314636817; Tue, 16 Jul 2019 15:03:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563314636; cv=none; d=google.com; s=arc-20160816; b=pD0mj7arGtW5tPHO/wHnKd6gWHHlcHYlclQp0DrD7Us79D+0FM82QBguMOTSXgDk2w QPRbAId5U+TAcyijqHKsNPcxN4i136tVzpIg73TzSiy/c5cRxTJbF86VmOzeEvxNeS7v cWBKKlHS0V8fzyYt/rN8ZtTCo9WE/9/Pl/T2OfOWCUWme8EK0ZuD8cK5wxdAmd+8LKe+ Ha1qZ/jtPh9Pwaq+1AHq/05kXKQgXZcyNDKRxDwa2xdyD6VoipLGSZJT9dmMA/ZzNjix YKxAncTBDR13NX0kGvH1b3EWsUrJm+Ag8HyaWGX9Wnsiu8s4QMsGZsZ34geDWrO1zfr3 lw7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=C7EAvIzJhfw3NRpeGOT4pyiQDG/JNI/dfZ3JbrT81Hg=; b=BoRVkEn9CxR99bXqFGv3vhocoG7HxVdWH4nALcl8H1UmLTXS91BtUjjuRo4Zfckmk4 HBQYNuF/e5hZsoKrpIL9wHDouC5qR7/BymDwx1SnP2iMZdXWw3imV5BQ1/FwJL5lvOFD 3szI9/QveULQZaNfdU7Di7X+IUmvfwe7uKnmQjwGMg71mc0/YBeQ3Qd8mQMtkdLd4YZq ZYCP1ST3XmDKu9VKHnPDCZ32NHjKMIKwhiGDKRzKYuasr8q2EKgHLnZ9x88+/6gkZhWf JvUSPGThrxdyAQYV50/cCSWWeZtVEKYF+ICUnzoK+YWS0itigzS3+B77AWKcUbg/ys0I iAuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XSWiZuBk; 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 s24si16385498pfh.227.2019.07.16.15.03.25; Tue, 16 Jul 2019 15:03:56 -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; dkim=pass header.i=@kernel.org header.s=default header.b=XSWiZuBk; 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 S1733307AbfGPWAu (ORCPT + 99 others); Tue, 16 Jul 2019 18:00:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:43754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728235AbfGPWAt (ORCPT ); Tue, 16 Jul 2019 18:00:49 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.8.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 459DC217D9; Tue, 16 Jul 2019 22:00:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563314448; bh=MZiI+dn9mTuyzIwRcV9Xmn9Ls3mvI60j/scPusuitoY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=XSWiZuBkMQon8Lef5PmzojoSZZ9fRe2jegeNSZnEenhkD8cdTCQlE6EJpSJoBqgjy wUCAz9PwWcsuoV7ZdQqEhoN9Mox91kVFBCk9L9u6wGxpu+qMlGIrkxCGHu/x3UMAnl J8ebYbD6PKGFHh6l70c9iZEJlyazzO5W9LuTVRLw= Date: Tue, 16 Jul 2019 15:00:47 -0700 From: Andrew Morton To: Nadav Amit Cc: Dan Williams , Linux Kernel Mailing List , Linux MM , Borislav Petkov , Toshi Kani , Peter Zijlstra , Dave Hansen , Bjorn Helgaas , Ingo Molnar Subject: Re: [PATCH 0/3] resource: find_next_iomem_res() improvements Message-Id: <20190716150047.3c13945decc052c077e9ee1e@linux-foundation.org> In-Reply-To: <19C3DCA0-823E-46CB-A758-D5F82C5FA3C8@vmware.com> References: <20190613045903.4922-1-namit@vmware.com> <9387A285-B768-4B58-B91B-61B70D964E6E@vmware.com> <19C3DCA0-823E-46CB-A758-D5F82C5FA3C8@vmware.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 18 Jun 2019 21:56:43 +0000 Nadav Amit wrote: > > ...and is constant for the life of the device and all subsequent mappings. > > > >> Perhaps you want to cache the cachability-mode in vma->vm_page_prot (which I > >> see being done in quite a few cases), but I don’t know the code well enough > >> to be certain that every vma should have a single protection and that it > >> should not change afterwards. > > > > No, I'm thinking this would naturally fit as a property hanging off a > > 'struct dax_device', and then create a version of vmf_insert_mixed() > > and vmf_insert_pfn_pmd() that bypass track_pfn_insert() to insert that > > saved value. > > Thanks for the detailed explanation. I’ll give it a try (the moment I find > some free time). I still think that patch 2/3 is beneficial, but based on > your feedback, patch 3/3 should be dropped. It has been a while. What should we do with resource-fix-locking-in-find_next_iomem_res.patch resource-avoid-unnecessary-lookups-in-find_next_iomem_res.patch ?