Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5921626imm; Mon, 27 Aug 2018 06:44:01 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbTrSg0NarFbe58TKWGoeTjLqio2LyeieZ0OSErzBRUMz5Oo3Q6Id0R/YVXCwPp64vwyLzN X-Received: by 2002:a62:5b85:: with SMTP id p127-v6mr14477259pfb.33.1535377441132; Mon, 27 Aug 2018 06:44:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535377441; cv=none; d=google.com; s=arc-20160816; b=XYH5b7Aj00vCP0oDnppBMA2oZ2JcUp5yjkCGDO/9C+Y5hgV8fAuJr9n7RMmLZn6jM8 mpYzjAYPvp7KxiwYP6vTRCz/BiTzPVVYk7lXMsndBMFtvdruov08SnolsIS8hsYHTBqZ QB5IqtTrQOvrgZfLPT5/i1c0zUVjUFyUBOdTOFvbBgF2Ia0VwP817UA4p1HxFrgxAWCc +NQoXnZyGQ4a2W9gG0Wyf3ugMZEfe3D+lDxnKc+Xppz1YMY5X13v/kyN+0syUpKi81C0 6OveFb2ADU9YSBYxHprGltrLaecQdGkJVHoD/cBkBCO7+aNviO3Hvma109RfZ5qHeG/T Cz/w== 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:arc-authentication-results; bh=0Ru13Dp54RzIJqNr6vCU5ocRMTuPuoyKORvT4aAfOOA=; b=fr207nuiyMdahH8LoYll6urIvQx2az/SmCJJ0YLeJDE8PzfyJ1lnp6/V46WT5uwxMl N1d7aMvReHD14EagZdmHecAgONaD2oJDfAyHTU/QuYm23X+3uA/g8rIVIONZJAqLHGAN iOYTmC31bE+4hXVVxoA+KEkKkh3+pvjDf1VN3sMW6AVB0SwoE2rZLdmlEPgd90Xa0wYq FenYdM5121k3fHquY9vreRgWmSyae25UlCznvL9hyrrXqAa+a6sz3kQIlPrlbfxhl74M UR4qW3hGSiUAhV0AVihr09biVAASWjUvggGzn5T7Bs/IaNhH4Ga88xy6Boc3JfdKytoG lEhA== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i22-v6si3766575pgi.52.2018.08.27.06.43.45; Mon, 27 Aug 2018 06:44:01 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727368AbeH0R3Q (ORCPT + 99 others); Mon, 27 Aug 2018 13:29:16 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:60510 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726934AbeH0R3Q (ORCPT ); Mon, 27 Aug 2018 13:29:16 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 783BF83221; Mon, 27 Aug 2018 13:42:34 +0000 (UTC) Received: from redhat.com (ovpn-125-115.rdu2.redhat.com [10.10.125.115]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C13912026D6B; Mon, 27 Aug 2018 13:42:33 +0000 (UTC) Date: Mon, 27 Aug 2018 09:42:32 -0400 From: Jerome Glisse To: Michal Hocko Cc: Andrew Morton , Tetsuo Handa , linux-mm@kvack.org, LKML , Michal Hocko Subject: Re: [PATCH 2/3] mm, mmu_notifier: be explicit about range invalition non-blocking mode Message-ID: <20180827134231.GA3930@redhat.com> References: <20180827112623.8992-1-mhocko@kernel.org> <20180827112623.8992-3-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180827112623.8992-3-mhocko@kernel.org> User-Agent: Mutt/1.10.0 (2018-05-17) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Mon, 27 Aug 2018 13:42:34 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Mon, 27 Aug 2018 13:42:34 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jglisse@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 27, 2018 at 01:26:22PM +0200, Michal Hocko wrote: > 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. > > Signed-off-by: Michal Hocko Reviewed-by: Jerome Glisse > --- > 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 >