From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 228E4C433EF for ; Thu, 10 Feb 2022 07:49:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 909E56B007D; Thu, 10 Feb 2022 02:49:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8B8EA6B007B; Thu, 10 Feb 2022 02:49:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7A84B6B007D; Thu, 10 Feb 2022 02:49:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id 6E2A16B0075 for ; Thu, 10 Feb 2022 02:49:52 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 36EFF2328E for ; Thu, 10 Feb 2022 07:49:52 +0000 (UTC) X-FDA: 79126096224.03.5B14C47 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf04.hostedemail.com (Postfix) with ESMTP id BE08940006 for ; Thu, 10 Feb 2022 07:49:51 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 45DF71F382; Thu, 10 Feb 2022 07:49:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1644479390; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EDHtHvuI0rX56upto/aTnkApaVCYeNt0NfBKbGzA2cw=; b=eoyRrh0VWU/qJAoLWCl9fgGdtYB1r6YQ73vYM6K7VJQdi8D3ZgJQpKti2VXmaxHz6O82Tl Mrz4lRsft7pzJHNn0OGo6csM5urkGCFprE9QJvBKirma9L6Jy5uie/5LuxR76/dvRk1x12 mVW46fCjSh7pKbD39YAlgCoLAMHPJ1E= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 38A70A3B8A; Thu, 10 Feb 2022 07:49:49 +0000 (UTC) Date: Thu, 10 Feb 2022 08:49:49 +0100 From: Michal Hocko To: Hugh Dickins Cc: Andrew Morton , Vlastimil Babka , "Kirill A. Shutemov" , Matthew Wilcox , David Hildenbrand , Alistair Popple , Johannes Weiner , Rik van Riel , Suren Baghdasaryan , Yu Zhao , Greg Thelen , Shakeel Butt , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 00/13] mm/munlock: rework of mlock+munlock page handling Message-ID: References: <8e4356d-9622-a7f0-b2c-f116b5f2efea@google.com> <147388c6-eb7-5c58-79a-7a8279c27fd@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: BE08940006 X-Stat-Signature: ibb4qzkq7w6auoj9949tu3t93fjsgqwj X-Rspam-User: Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=eoyRrh0V; spf=pass (imf04.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-Rspamd-Server: rspam05 X-HE-Tag: 1644479391-267011 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed 09-02-22 14:59:19, Hugh Dickins wrote: [...] > Ah, but you're worrying about any previously-mapped pages when > VM_LOCKONFAULT is established: those ones get done by mlock_pte_range() > in 07/13, same as when VM_LOCKED is established - I checked again, > VM_LOCKONFAULT is not set without VM_LOCKED. Right you are. mlock_fixup->mlock_vma_pages_range is the missing piece. This is called for both do_mlock and mlockall paths. So all good and thanks for the clarification! I will get back to this sometimes next week. -- Michal Hocko SUSE Labs