Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3105331imm; Fri, 24 Aug 2018 10:34:59 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaQ1ZCN4UOplpYPiZA8SIUc+pdBGMUMXVD+RxXn4zDGUOSUbR2z9NkkmnU+2/bfXLaPc9p/ X-Received: by 2002:a63:cc4f:: with SMTP id q15-v6mr2540965pgi.217.1535132099496; Fri, 24 Aug 2018 10:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535132099; cv=none; d=google.com; s=arc-20160816; b=eBrknPXQYybZYSUdHgK7q68NLS4Sfws/49dofj0CTqNfDdDJEZ3zp/Fz6k/hT1iFTr qIyBY82tTQct5XVj7gCKtHZ56uQM6wnibosPB0yl6rjNtVy/XB1HMeeHv4q2m5sl71qN WxnGpSHgmU641vOUtQeDqZOrIXLFewtuF8XLLD1eL56zKQr6iMrugAEvEdnu11bO8KOd Fn2AwNenbmW/fla2HpomthRf4Uhq9HlETpO2vyIbatzM6vqJwqwh5u8vI9uyOBkKchjS wEncogTpcbR4Y1mwAecnwplt14t1jjHQTVz7HP35T5QQUngSIJPcnqHyz/gku74JydLL WNOA== 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=cRsP1Iz+WXYpsCsS3bPIK9aAHOvJygExcL8CyqXFyxA=; b=AwxddW/EYhLKZtMH4ZoVdZG8A4kv3ogh9Nmj/0JFWx7+DfjCr6JnWmfW0+Mf9wQlJ+ u0sF67CAobUHtOWB16pqfAd1OIfCrWEhRnoupDb77j8lqBb1iPu4gPMy4a7opJVsu2DA McIwlZy3mJKV8sbJD0WeXyLahBN7GS9cZLNGMl7xJG2GmsDvXpH6XwWv961UmzbRriqF kQXF1PD8PVhGN6+BLiuWj5C81vFLMb8iBXsWhLMUYGgCLdPKoUnm6BMj1tZwX/XYcqGf qU0WSRE9C79FuXMvaNTQq4PIog4vBMsbOADJev8g5Vmk+L8LQ6e10Zb1yPDcySIUdS2O vIgA== 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 t10-v6si7532941pge.624.2018.08.24.10.34.43; Fri, 24 Aug 2018 10:34:59 -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 S1727556AbeHXVJQ (ORCPT + 99 others); Fri, 24 Aug 2018 17:09:16 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:39334 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726277AbeHXVJP (ORCPT ); Fri, 24 Aug 2018 17:09:15 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 088AC87A78; Fri, 24 Aug 2018 17:33:38 +0000 (UTC) Received: from redhat.com (ovpn-125-224.rdu2.redhat.com [10.10.125.224]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0DE402156889; Fri, 24 Aug 2018 17:33:33 +0000 (UTC) Date: Fri, 24 Aug 2018 13:33:32 -0400 From: Jerome Glisse To: Michal Hocko 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: <20180824173332.GD4244@redhat.com> 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> <20180824164003.GW29735@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180824164003.GW29735@dhcp22.suse.cz> User-Agent: Mutt/1.10.0 (2018-05-17) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 24 Aug 2018 17:33:38 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 24 Aug 2018 17:33:38 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.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 Fri, Aug 24, 2018 at 06:40:03PM +0200, Michal Hocko wrote: > 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. In my branch i already updated HMM to be like other existing user ie all blocking operation in the start callback. But yes it would be wise to added such comments. > > 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