Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp640149ybl; Fri, 16 Aug 2019 01:28:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAKtYwzhFyq6R+AurJoG8f7MXdAxn3xkleyKMrIUGWSr6mw8+sIMoHmf5i9UaMjRYMPDl8 X-Received: by 2002:a63:607:: with SMTP id 7mr6703310pgg.240.1565944122238; Fri, 16 Aug 2019 01:28:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565944122; cv=none; d=google.com; s=arc-20160816; b=Ps8xEy5GDmob5BZKjTd2qTlCmM4G61/+lYiF42ShYJm7iVzSppoFtfuDkWFiO6WJ6A /IokFfAlIwt7CjGYlalX495a8oHInL9yRJ/pYVpkI9nnZR5AZc79KUNq7WyV/w6hxSoa /F2uqB5ZjvlLQTazxC//sU9bluJjErI3iaY7EtKr86P+MjXU3ng0u+dhjaRyoNKdbf3Y VcUSnt/ge4PtkgHSuw94lWYtq3Ykr29dXrPPj9C8WYnN0279nypPbwunjKSawmHTN/gQ b7yAVLGp0uN/8JBlm22cB5fZjkrpnYTamxq02z+9kaPoPrXPvcjf5zFVRNC0hTF+oQLb B42A== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=WBcLJv4fnoBO25KipesrsOMEcNTJWzF+F+uGa1pGUhI=; b=fWAiLEWNJvF6ENZ0fHwjK3VgSDraK5Q44XeImKQJl9u3HrfkQOhYJR+f8vcG6hkTOw UksC5u31JaFt4/HsAmsa/r2VPUUOqMQ1uothhc9McTFJM1aVM8OJz2uaXZZTEPOodtKY pAZT7uGkKbX/MEjJryMNdaycGF3r4euHt3VjmfQwYwHgLLkTqahfSSmp7APWExez2eYs 6Lq2Dcim/Q6sM5ObXYBNGPgPweu/lgSd6zZYsxYXoU3+3ypfslsl7Onmf37hHJLwMdWm o7pttodh8Lh9yhr+LxDNLbA1wBo9NxjtHPl9tWzp6Qq1eZgMYG0yCd8uQliNq2SGbVTL ooiw== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y7si3381242pgi.401.2019.08.16.01.28.24; Fri, 16 Aug 2019 01:28:42 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726903AbfHPI1l (ORCPT + 99 others); Fri, 16 Aug 2019 04:27:41 -0400 Received: from mx2.suse.de ([195.135.220.15]:42988 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725945AbfHPI1l (ORCPT ); Fri, 16 Aug 2019 04:27:41 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E376FAFC3; Fri, 16 Aug 2019 08:27:39 +0000 (UTC) Date: Fri, 16 Aug 2019 10:27:38 +0200 From: Michal Hocko To: Daniel Vetter Cc: Jason Gunthorpe , Feng Tang , Randy Dunlap , Kees Cook , Masahiro Yamada , Peter Zijlstra , Intel Graphics Development , Jann Horn , LKML , DRI Development , Linux MM , =?iso-8859-1?B?Suly9G1l?= Glisse , Ingo Molnar , Thomas Gleixner , David Rientjes , Wei Wang , Daniel Vetter , Andrew Morton , Andy Shevchenko , Christian =?iso-8859-1?Q?K=F6nig?= Subject: Re: [Intel-gfx] [PATCH 2/5] kernel.h: Add non_block_start/end() Message-ID: <20190816082738.GC27790@dhcp22.suse.cz> References: <20190815132127.GI9477@dhcp22.suse.cz> <20190815141219.GF21596@ziepe.ca> <20190815155950.GN9477@dhcp22.suse.cz> <20190815165631.GK21596@ziepe.ca> <20190815174207.GR9477@dhcp22.suse.cz> <20190815182448.GP21596@ziepe.ca> <20190815190525.GS9477@dhcp22.suse.cz> <20190815191810.GR21596@ziepe.ca> <20190815193526.GT9477@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 15-08-19 22:16:43, Daniel Vetter wrote: > On Thu, Aug 15, 2019 at 9:35 PM Michal Hocko wrote: [...] > > > The last detail is I'm still unclear what a GFP flags a blockable > > > invalidate_range_start() should use. Is GFP_KERNEL OK? > > > > I hope I will not make this muddy again ;) > > invalidate_range_start in the blockable mode can use/depend on any sleepable > > allocation allowed in the context it is called from. So in other words > > it is no different from any other function in the kernel that calls into > > allocator. As the API is missing gfp context then I hope it is not > > called from any restricted contexts (except from the oom which we have > > !blockable for). > > Hm, that's new to me. I thought mmu notifiers very much can be called > from direct reclaim paths, so you have to be extremely careful with > getting back into that one. Correct, I should have added that notifier callbacks ideally do not allocate any memory. They can block and even that is quite a pain to be honest. -- Michal Hocko SUSE Labs