Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751250AbdH3GS5 (ORCPT ); Wed, 30 Aug 2017 02:18:57 -0400 Received: from mail-by2nam01on0078.outbound.protection.outlook.com ([104.47.34.78]:60192 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750891AbdH3GSz (ORCPT ); Wed, 30 Aug 2017 02:18:55 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Christian.Koenig@amd.com; Subject: Re: [PATCH 04/13] drm/amdgpu: update to new mmu_notifier semantic To: =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: amd-gfx@lists.freedesktop.org, Felix Kuehling , Alex Deucher , "Kirill A . Shutemov" , Andrew Morton , Linus Torvalds , Andrea Arcangeli References: <20170829235447.10050-1-jglisse@redhat.com> <20170829235447.10050-5-jglisse@redhat.com> From: =?UTF-8?Q?Christian_K=c3=b6nig?= Message-ID: <2bdbe5bd-ab1f-831b-5f0e-c2381b0cd14f@amd.com> Date: Wed, 30 Aug 2017 08:18:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170829235447.10050-5-jglisse@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [2a02:908:1251:7981:e499:e4eb:4470:5172] X-ClientProxiedBy: VI1PR0502CA0032.eurprd05.prod.outlook.com (52.134.0.173) To BN6PR12MB1300.namprd12.prod.outlook.com (10.168.227.150) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 100656f4-7287-4e1c-4923-08d4ef6efc57 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:BN6PR12MB1300; X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1300;3:/yTDJeuQ4g4bnPCLNfhMpHazaSn/rYOh5LNTkKh3vcqElrhT7tD+1MjoSbW44/dTbNu043YH2GjzW+Tf8S9q8a4Jorwzz4oMVYfpn8yei5dfwJxn956yHaeC6/9oEQ4xim05piXkH4TXshHfwfPQTG2S66aaB2hhTu6AnOjpQe+w9cs7h63cB5YBZk4wktWBx73YcGc7lkLQr5ZJrJ/9h9Qvc3YohK/xL/FjJrT2SK8+FyuSRhmy1uCoGGr0ALno;25:5qAc2usOp4ApkoLzLMAvoP9N/qyBWHW+sGrxmuTdMBQdQA/XDpmbaLR8qTkCliu7axz20s+H78uR2+IlYOiw+NtUUwHYqRdR0iOI9/1P9dxIg25neNd/EgbW5yjpHYRxdfukMjC49ECjpYK4z1JGGPGy0LDNthbTfU0PEc3qllbx6LgmaamIeE7YUPoeIUqZVYuk2dKve+rFqabysKlldXGNPQs6hq6ZdEAA3BY42RRyj3LFmi9SKFjkeZ4pV6J5vfykaP20GP4pAfEvUqaBht6PP+hpkqo07DGi4W6Lk+2cJAb2ZkiXba6ks3hK4/UUs+MSVr6+8SenjAEabalPnQ==;31:08HfUElWUmp5opjqsTeKKhlgF8ccvUp3/HQuplaAEFM9tay78o8XXWCMPr2gAmj9TVFCHV1zTLVEm+XHLWqELyeNB1adlk/1KUV3qy/L5FOjWIw34StUFIzTpXUvoVvpD+Ci5AsdXKw61ZzL3rM0ojqVOu2XDqNAdsZRI2UBeUShB/bKj5otI3k201aiUjw9BVqJKbwvBhSipbCw0oWX4be3IiBlf4DigcV952Dq+Xk= X-MS-TrafficTypeDiagnostic: BN6PR12MB1300: X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1300;20:Z9UvtDxVgZH3Jb9aB96Pq2Qn7wxuVofQVvXLKH7FJcmVQEltUG7WApOJB5YzSXMhyhBq+wkO5ySBHnDUv4SEjo/iOt+1RMlo6H1bd0KJjcoA2aXaEP1w6iYs/oU93tIdFxZg2ugtpHP3uP4sKfqnk/mI4zyQ8i6C4KOmj5koDFZWm/NtLWbTf4XK2lpzlvUoqtGf2NXWfroNA5xsGYpYoXdWct2AuSYEiZgHjAoORenqar2Lfcj1dx++y0C6x7GpvefTafCjZdFmbBBxZhuorGmZ9NQoR9Kkp9CXo9xToEJbXjXYuCfG62kH/uU3ptLySDf7vnRPj76kF0e8OfElRHaht7x3i0UU/+UbHjeM4W5Cwov9SNhH+/9+zsBIISQMTAyWl4J8F2P1DrJFOcIovHtJ9npqQ0y7UQaucZUTyxhfqneQ/aJ/4hzV7RZt8iOnS0/a0dE3fGfmj/c0vFW33wp7a3YorgWtFwc7iquCbB6zQQr03rYPgM1Luou9NJeG;4:lJUmd+f9ay0bWFtqYZ9/ukfI8CEClUaZP0gCywL3FFB0OWlFJadb18+nnaN0U5qvoN3/QNWL+mSxsmKqWkrq0SkNw9ih975WJoPgH+oIgLYc6J/tB0IXMLZPFRJtMCKBnXq8sgdaOFw8uMNfcEDcBaMUuAZDbBD3d/tTRF3npgi9ZfdxVZIvrcSLmHESilB3xFHp1v8/cRx3dB+6l2OjR7xypm6v62vlerW8mieW8zufgEbXpcxPC8xL1HAv+1JswM93NgZb1h+dj68ljmGf3Q1iCUCq0Y+XhJmAhYoJHBPmW3Zbb6hXK9PZceVGKs5J6Yr6RdIfnzzVQAH8vxGVg3yZmj7PuohEuyjpgFxd13M= X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(217544274631240)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123560025)(20161123562025)(20161123555025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BN6PR12MB1300;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BN6PR12MB1300; X-Forefront-PRVS: 041517DFAB X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(39860400002)(199003)(189002)(6246003)(229853002)(6486002)(5660300001)(2906002)(33646002)(6116002)(68736007)(6666003)(2950100002)(65826007)(81156014)(8676002)(8936002)(81166006)(83506001)(23676002)(65956001)(2870700001)(76176999)(50986999)(101416001)(189998001)(65806001)(47776003)(54356999)(36756003)(31686004)(50466002)(42186005)(64126003)(105586002)(106356001)(4001350100001)(97736004)(31696002)(86362001)(53936002)(54906002)(110136004)(7736002)(1706002)(305945005)(4326008)(72206003)(25786009)(478600001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR12MB1300;H:[IPv6:2a02:908:1251:7981:e499:e4eb:4470:5172];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjEyTUIxMzAwOzIzOkhtTnNLTzFsbUdrUjE4MytHekwvalVtYlNX?= =?utf-8?B?a1l6aWZQNjlqZlh3UUhTZzdrSVRYTXEwOHhrMzByVDVQTFBUek1qVmxFS3dr?= =?utf-8?B?YVluWVhaRnJJSEFjRVFOZCtDamU0TXRnN2JZam14dmdSaUV3MzdPOU1zSVgx?= =?utf-8?B?bGhtYk5BQkdCZU5FS3pYTVptSGZMVzliUVdlQ0lJZjA0dU1VRlg3OUFlVnlT?= =?utf-8?B?Ly9FaDk2R3F1bEVuMXdnK1A5RVcxOFEvZURvdDdMbXJLcmZRa1dRUldFS1pw?= =?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VWlJPYtNAiri1DB+kWdgvTSB7n/lo1AebhR5xPKo1CvjEdFnuzE/B5HiBQ==;24:UoGRsyAhcOgCqgNcQSaSUcUvdd3OAm88E4DLXe5UFq8CD2icmxIjIHVI0RAxDguwoIQ1iSmx8GZGtDbUu9DTn6I+CH9gzVRtI+s0g0PQ1Q8=;7:Jc/LeSDhYMTVcinYaiXNUrF9120HCII0B9/HECzmUaeuBEQ77ZCyXELbCP2OqtaBqukV4YqAZxciIqL7Yc2+sWT8OtRe+A99kdZ13z3YyOUflLSM1r4vCOeQQK3f62SzGtIInBz2HAOce4zCuFMIURCyzJu3ZnKnnAY6cqSQedmKFL4NBaDahIw/tpJ34/NsgsqmihW0dDCDCrZZWwH5wSr4uPjxUqZQuc80bzdcRpI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1300;20:oOj+N0Cx3mRnhjYeI2EKkSeKkyPUhLFDJB3VM9w0V1DK9dVpPH84G0avQVEt0xzGopjRUO8KqbFrev6bg+oXcYXerSSaCBzdGSZaQl5y0iR5IznEDX/+nnn9k81MtIT5NN88MzQbDYx5fPudFpEwT1tOQJ/Ezzv4H8K4qO+ePzOczb5Q4MbNHJKxA6++oIPvEJmBIYGX4j9aWhpp32NMyG/f5M9yM6LjAddaHW+OKH5VaaUyC6A4/pQ4Nx9Wmdq9 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2017 06:18:50.7758 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1300 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2816 Lines: 82 Am 30.08.2017 um 01:54 schrieb Jérôme Glisse: > Call to mmu_notifier_invalidate_page() are replaced by call to > mmu_notifier_invalidate_range() and thus call are bracketed by > call to mmu_notifier_invalidate_range_start()/end() > > Remove now useless invalidate_page callback. > > Signed-off-by: Jérôme Glisse Reviewed-by: Christian König The general approach is Acked-by: Christian König . It's something very welcome since I was one of the people (together with the Intel guys) which failed to recognize what this callback really does. Regards, Christian. > Cc: amd-gfx@lists.freedesktop.org > Cc: Felix Kuehling > Cc: Christian König > Cc: Alex Deucher > Cc: Kirill A. Shutemov > Cc: Andrew Morton > Cc: Linus Torvalds > Cc: Andrea Arcangeli > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 31 ------------------------------- > 1 file changed, 31 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c > index 6558a3ed57a7..e1cde6b80027 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c > @@ -147,36 +147,6 @@ static void amdgpu_mn_invalidate_node(struct amdgpu_mn_node *node, > } > > /** > - * amdgpu_mn_invalidate_page - callback to notify about mm change > - * > - * @mn: our notifier > - * @mn: the mm this callback is about > - * @address: address of invalidate page > - * > - * Invalidation of a single page. Blocks for all BOs mapping it > - * and unmap them by move them into system domain again. > - */ > -static void amdgpu_mn_invalidate_page(struct mmu_notifier *mn, > - struct mm_struct *mm, > - unsigned long address) > -{ > - struct amdgpu_mn *rmn = container_of(mn, struct amdgpu_mn, mn); > - struct interval_tree_node *it; > - > - mutex_lock(&rmn->lock); > - > - it = interval_tree_iter_first(&rmn->objects, address, address); > - if (it) { > - struct amdgpu_mn_node *node; > - > - node = container_of(it, struct amdgpu_mn_node, it); > - amdgpu_mn_invalidate_node(node, address, address); > - } > - > - mutex_unlock(&rmn->lock); > -} > - > -/** > * amdgpu_mn_invalidate_range_start - callback to notify about mm change > * > * @mn: our notifier > @@ -215,7 +185,6 @@ static void amdgpu_mn_invalidate_range_start(struct mmu_notifier *mn, > > static const struct mmu_notifier_ops amdgpu_mn_ops = { > .release = amdgpu_mn_release, > - .invalidate_page = amdgpu_mn_invalidate_page, > .invalidate_range_start = amdgpu_mn_invalidate_range_start, > }; >