Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3052743imm; Fri, 24 Aug 2018 09:41:24 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbyByYVgoZDov8KijEtmAStFrN/ikIP66yFPGbl5ErBuDm9fe1mrEwF/Ai0uKpYO+dRBGM4 X-Received: by 2002:a63:db15:: with SMTP id e21-v6mr2451932pgg.418.1535128884111; Fri, 24 Aug 2018 09:41:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535128884; cv=none; d=google.com; s=arc-20160816; b=nPCQ9L4FScq3o573Vf6Y930w1km4fNj8jNhepzeFBa2+WnFoL458THN6TUJuzWZkyg bgUBsZfaw2/7U1V1CQBWZuVBybhVm01ZDfjMgqOIIJysLFI4/OxF5P3Ch1mxKDjmo5jm U6zHCBcdgjNIDhCF+/9zf7hHxTPNGl0GYcnFtoMhriqcSxWNGhmsYh5AFSuL2FU4gY9H b5JfCHlvRNWtGiIH/HJMVoJC8c3yzsbCFzah1kLUNlgc70d5lTwhJUjRhNFDh4lcO/xb H5sT1OWSsbkSP9T3uUdCwgGOE6uuYF5pQT+ixes76vpyrVjkQG+pd1f2zWVplwlmJKZZ L15A== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=VJ11wPmu2oUcPqG/u49Ez6WzTEvjWN3tR9MgYxVNAgY=; b=jpkP9au6nzKnkBWnBKBOucGdyRPbf29MVxkmYdiSlBUlaVyRfsbx3YBdYoeGeqwcmz eLTl2TCfEdnu7u2cdasDvCcQO+jcDQvUeAGLxD2hBvy7EczmPEEMduKWPeB1iYe1zzoi Xut4xi8IZLBfEeRplljGUjub+0sZUWwTSjo5wVNelMiVY/S/Ea/nzg3igHNJp1cChISl lZiot2454Egv9paXZS8z3stjd2Cjm60KunmlykPnfh8kBJFaWPaUvplVej35sMIMbF3P LgF1FoU9tlMoGHu8UvTqw4XYFz5hprLOtfyHMx7ESE4z3dlWefWFTbZ9kD2Vhr/IrEOk mQ9g== 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 k2-v6si6666249pgq.503.2018.08.24.09.41.08; Fri, 24 Aug 2018 09:41:24 -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 S1728247AbeHXUPc (ORCPT + 99 others); Fri, 24 Aug 2018 16:15:32 -0400 Received: from mx2.suse.de ([195.135.220.15]:35210 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727463AbeHXUPc (ORCPT ); Fri, 24 Aug 2018 16:15:32 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C318BAF5B; Fri, 24 Aug 2018 16:40:04 +0000 (UTC) Date: Fri, 24 Aug 2018 18:40:03 +0200 From: Michal Hocko To: Jerome Glisse Cc: Tetsuo Handa , Andrew Morton , LKML , linux-mm@kvack.org, "David (ChunMing) Zhou" , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Alex Deucher , David Airlie , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Doug Ledford , Jason Gunthorpe , Mike Marciniszyn , Dennis Dalessandro , Sudeep Dutt , Ashutosh Dixit , Dimitri Sivanich , Boris Ostrovsky , Juergen Gross , Andrea Arcangeli , Felix Kuehling , kvm@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-rdma@vger.kernel.org, xen-devel@lists.xenproject.org, Christian =?iso-8859-1?Q?K=F6nig?= , David Rientjes , Leon Romanovsky Subject: Re: [PATCH] mm, oom: distinguish blockable mode for mmu notifiers Message-ID: <20180824164003.GW29735@dhcp22.suse.cz> References: <20180716115058.5559-1-mhocko@kernel.org> <8cbfb09f-0c5a-8d43-1f5e-f3ff7612e289@I-love.SAKURA.ne.jp> <20180824113629.GI29735@dhcp22.suse.cz> <103b1b33-1a1d-27a1-dcf8-5c8ad60056a6@i-love.sakura.ne.jp> <20180824133207.GR29735@dhcp22.suse.cz> <72844762-7398-c770-1702-f945573f4059@i-love.sakura.ne.jp> <20180824151239.GC4244@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180824151239.GC4244@redhat.com> 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 Fri 24-08-18 11:12:40, Jerome Glisse wrote: [...] > I am fine with Michal patch, i already said so couple month ago first time > this discussion did pop up, Michal you can add: > > Reviewed-by: J?r?me Glisse So I guess the below is the patch you were talking about? From f7ac75277d526dccd011f343818dc6af627af2af Mon Sep 17 00:00:00 2001 From: Michal Hocko Date: Fri, 24 Aug 2018 15:32:24 +0200 Subject: [PATCH] mm, mmu_notifier: be explicit about range invalition non-blocking mode If invalidate_range_start is called for !blocking mode then all callbacks have to guarantee they will no block/sleep. The same obviously applies to invalidate_range_end because this operation pairs with the former and they are called from the same context. Make sure this is appropriately documented. Signed-off-by: Michal Hocko --- include/linux/mmu_notifier.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h index 133ba78820ee..698e371aafe3 100644 --- a/include/linux/mmu_notifier.h +++ b/include/linux/mmu_notifier.h @@ -153,7 +153,9 @@ struct mmu_notifier_ops { * * If blockable argument is set to false then the callback cannot * sleep and has to return with -EAGAIN. 0 should be returned - * otherwise. + * otherwise. Please note that if invalidate_range_start approves + * a non-blocking behavior then the same applies to + * invalidate_range_end. * */ int (*invalidate_range_start)(struct mmu_notifier *mn, -- 2.18.0 -- Michal Hocko SUSE Labs