From patchwork Fri Mar 27 20:00:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 11463049 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F0FF881 for ; Fri, 27 Mar 2020 20:00:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BE1B82072F for ; Fri, 27 Mar 2020 20:00:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="C5617SlJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE1B82072F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3E38E6B006C; Fri, 27 Mar 2020 16:00:32 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 36AB06B0070; Fri, 27 Mar 2020 16:00:32 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1BC1F6B006E; Fri, 27 Mar 2020 16:00:32 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0063.hostedemail.com [216.40.44.63]) by kanga.kvack.org (Postfix) with ESMTP id 0548A6B0037 for ; Fri, 27 Mar 2020 16:00:32 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id B80F6180AD807 for ; Fri, 27 Mar 2020 20:00:31 +0000 (UTC) X-FDA: 76642209504.16.thing34_21a648f9e4435 X-Spam-Summary: 2,0,0,642010d8dd7ab350,d41d8cd98f00b204,jgg@ziepe.ca,,RULES_HIT:41:69:355:379:541:800:960:967:968:973:988:989:1260:1311:1314:1345:1437:1515:1534:1541:1711:1730:1747:1777:1792:1801:2393:2525:2559:2564:2682:2685:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3352:3865:3866:3867:3868:3871:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4250:4321:4362:4605:5007:6117:6119:6120:6261:6653:7576:7875:7901:7903:9025:10004:11026:11473:11658:11914:12043:12050:12296:12297:12438:12517:12519:12555:12679:12895:12986:13069:13311:13357:13846:13894:14096:14181:14384:14394:14581:14721:21080:21325:21444:21451:21627:21990:30012:30054:30070,0,RBL:209.85.222.193:@ziepe.ca:.lbl8.mailshell.net-62.2.0.100 66.100.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: thing34_21a648f9e4435 X-Filterd-Recvd-Size: 4548 Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Fri, 27 Mar 2020 20:00:31 +0000 (UTC) Received: by mail-qk1-f193.google.com with SMTP id d11so12209103qko.3 for ; Fri, 27 Mar 2020 13:00:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=D8fCTtzi21rJlCDdrk/Qt4mRhY2LRYMqkZWb9k+PBbA=; b=C5617SlJKHaltq+P4jD+zs0K+W3xo/qPxCOnByb/v3+uCZBo4Uw70HHcyTUH0tYvgz I3jOTCrtR/FJDnqCuavzCyNe/VlZQkUTvnkjJHzReUgOotK95HUP3J/V430Z3dS7ahya 7DsUVJg0Y4hUIwJSJm9aa5WGBoU26QeTO7KzarIiEcINrKXaHeIR5eeAyLHzysBr0CNW 1aLFndYPAFSe/4jeO3bxY0dFvAnB2I+5vAkgEzFVsUVZ/hEcYO8JE4iOKtbn1UNH0Vqb KWBPZ+lxf4V+NpQSm4AW7kbPjbRSj9R1jJBpuTahH41hQodlwY3ziH+JRit3oCbOXnLs sEsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=D8fCTtzi21rJlCDdrk/Qt4mRhY2LRYMqkZWb9k+PBbA=; b=Tg92rrnhn0m+3ufrzEycqwom+IoiBAVd1fpX6Ndmx0JKZ1lfhaIDHBfrhQdqCbEWy9 8xJnFC874O1LXWU6LkMekeX+70JTdbYtv7RwJ3CQ/lNYaJXikuuyWmRAdLl8MDgUp8KP ubViRV1ndOXh85U26eBMcYEdBLik7Z+P+yXl4Ot2NXgWTfSLmZgNU7LtV45jzGUx8bB4 EsjXA0iVI3OZGkl+AWaBqR0zQc7B0nusJIG42mS2MYcrJZin7zlABFzOL6LthZtpHi/I IE6CEJSPPJq2JACKfwx8Olt/g3+ujFkBqrbqBTUVdnEi5Nc+lj2F9AUGMQXaiQpcFG6+ uxEg== X-Gm-Message-State: ANhLgQ2dLe7PCfcbAeAzyeLLAJsga5eog2QxzIZh6zcRBL9DBbecjUwC s9qO9xu7hnXlVCTqazVQNmB4Kg== X-Google-Smtp-Source: ADFU+vvrgv81gk4o6ZONBv5TnpgQOQoDOlqWAan4RLn09G+ZQn+4gCIv3XDzhdy5FMhauUz+aYj37w== X-Received: by 2002:ae9:ed45:: with SMTP id c66mr1018159qkg.488.1585339230457; Fri, 27 Mar 2020 13:00:30 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-68-57-212.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.57.212]) by smtp.gmail.com with ESMTPSA id b189sm4414461qkc.104.2020.03.27.13.00.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 Mar 2020 13:00:25 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1jHv9U-0007fN-Rs; Fri, 27 Mar 2020 17:00:24 -0300 From: Jason Gunthorpe To: Jerome Glisse , Ralph Campbell , Felix.Kuehling@amd.com Cc: linux-mm@kvack.org, John Hubbard , dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, Christoph Hellwig , Philip Yang , Jason Gunthorpe Subject: [PATCH v3 hmm 0/9] Small hmm_range_fault() cleanups Date: Fri, 27 Mar 2020 17:00:12 -0300 Message-Id: <20200327200021.29372-1-jgg@ziepe.ca> X-Mailer: git-send-email 2.25.2 MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000004, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Jason Gunthorpe This is v3 with some minor adjustments made. We are at the end of the dev cycle, and as nothing major has come up I'll push this toward linux-next to get some coverage and decide next week what goes this cycle. v3 changes: - Keep NEED_WRITE_FAULT and NEED_FAULT separate (CH) - Use CH's vesion of hmm_can_fault and drop the inline v2: https://lore.kernel.org/r/20200324011457.2817-1-jgg@ziepe.ca v1: https://lore.kernel.org/r/20200320164905.21722-1-jgg@ziepe.ca Thanks to everyone who looked on this, Jason Jason Gunthorpe (9): mm/hmm: remove pgmap checking for devmap pages mm/hmm: return the fault type from hmm_pte_need_fault() mm/hmm: remove unused code and tidy comments mm/hmm: remove HMM_FAULT_SNAPSHOT mm/hmm: remove the CONFIG_TRANSPARENT_HUGEPAGE #ifdef mm/hmm: use device_private_entry_to_pfn() mm/hmm: do not unconditionally set pfns when returning EBUSY mm/hmm: do not set pfns when returning an error code mm/hmm: return error for non-vma snapshots Documentation/vm/hmm.rst | 12 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- drivers/gpu/drm/nouveau/nouveau_svm.c | 2 +- include/linux/hmm.h | 109 +-------- mm/hmm.c | 307 +++++++++--------------- 5 files changed, 128 insertions(+), 304 deletions(-)