Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5790037imm; Mon, 27 Aug 2018 04:28:25 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYvfzZMnRHz52YB0LSMs/ZJ0VZeW7XazKBN13IFV6ev3czxnGmDIKAGaAolAALhraaz9i4W X-Received: by 2002:a17:902:8f8c:: with SMTP id z12-v6mr12749635plo.4.1535369305428; Mon, 27 Aug 2018 04:28:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535369305; cv=none; d=google.com; s=arc-20160816; b=dwKq0jlE6DqV4DN5yXOzj8GMK7I7Cn01yY0gyvxRJWfwk4L0+xqQ5h/ftM5D7nBs/T bmeYTX3u+/ssPyf7k+269vLBX17gZ8fP1PQsr5cui2FKgVoe+wd4eu0O3bpzifb4rnKg 03Zvf8sZUysXkzR5X+QetEkiXJK+g6Bv2mPiIXNOO7AhJBStoP8vRh/5z5TU3YYshwme J+9oEZARX2auDx5H/+Z0abT1qsz8a47P7EDC1+ELD3umXxXmy/Od85UQ5a8g9EAH4TSh XIm9hMkefXspM59fl20za8UrGGtmv0Yjv51yP6YU71cK4rhqoxITSSfNzDhqiKjTHiNk Fg6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=p42iIwbTrGPV1JR8A37slGiCspSWLnuG5EvrzB1+OHU=; b=kgxqkpbhm0lYn7SdgWdt+saktpUX1EGMzR0N7HhDBy59Z0NkBSEOz16azf2FPktq3H aYM42dgX32RcnHpgHjRyDzjuAyinqkLTZsvezB6MXqE2oBXiQU0GQIXrG/M83xo8fB3i 2JirBA+n2hwyUhmarIWcSiIYwoxjtsJ+AfKFqo4oTjSd1M/sK9wuVpXm2lC4T4cq68jb hZUW+IMyppDqQOCt0n8rFNULx0qVRI6uojzLuju56nWy16qIg2YSJSc0Fn2JLW42J568 ldAcFdvlVCsvcscTzzAdIV+9Gdi69jCODUNZ0NXD8bVzcjb567dPnlpSAtVBUwsBO1Y+ t9Ig== 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 r22-v6si11060571pgb.509.2018.08.27.04.28.10; Mon, 27 Aug 2018 04:28:25 -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 S1727417AbeH0PMz (ORCPT + 99 others); Mon, 27 Aug 2018 11:12:55 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:41611 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726966AbeH0PMy (ORCPT ); Mon, 27 Aug 2018 11:12:54 -0400 Received: by mail-ed1-f67.google.com with SMTP id f38-v6so10178514edd.8 for ; Mon, 27 Aug 2018 04:26:38 -0700 (PDT) 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:in-reply-to :references; bh=p42iIwbTrGPV1JR8A37slGiCspSWLnuG5EvrzB1+OHU=; b=aLaDao71hB6FYohHPZc1KCuGGm51jPZ6i/d2pwEcsu8VCUXJsapfYfctifTGKOAd76 fYmUJzE0V3PftjOKd9K328FXjWJQMsAljb2NERVmgrYmRgXMu9dwpnxHUGvf0GwyFZkl fhYPbzoOsCsS4sbNhBZj9Epl2EmLx8+F6CthtDm7lk599lcELQiX9qhzgNGnFZKN6aYc qNOK5wJfaeGGrxDnDk+ALjdQVKHXwQwr4BQpQ6Rt8z0jIznXHxRXWFKvcpaCiHRqRuTA 9b3f13RhJNQEaD1CropSJQaDw/10eBt8NLEzNA4hW1akhShxx3ExYV9s+cb+6At/ZEOB B/1w== X-Gm-Message-State: APzg51DC1OAfSuqGi5Gt6aE9um5ff3jgdE61cGWf8cBofAorsZDPUu/6 0ExxrzDKighsFNWC5cs6BN8= X-Received: by 2002:a50:f297:: with SMTP id f23-v6mr16804558edm.40.1535369197863; Mon, 27 Aug 2018 04:26:37 -0700 (PDT) Received: from tiehlicka.suse.cz (prg-ext-pat.suse.com. [213.151.95.130]) by smtp.gmail.com with ESMTPSA id v1-v6sm6454416edf.3.2018.08.27.04.26.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Aug 2018 04:26:37 -0700 (PDT) From: Michal Hocko To: Andrew Morton Cc: Tetsuo Handa , , LKML , Michal Hocko , Jerome Glisse Subject: [PATCH 2/3] mm, mmu_notifier: be explicit about range invalition non-blocking mode Date: Mon, 27 Aug 2018 13:26:22 +0200 Message-Id: <20180827112623.8992-3-mhocko@kernel.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180827112623.8992-1-mhocko@kernel.org> References: <20180827112623.8992-1-mhocko@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michal Hocko 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. Cc: Jerome Glisse 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