Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5561712pxb; Mon, 14 Feb 2022 02:00:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJybxFXTjIYDcjdY1vUBA81EHZc/7GXTt0bTCwrKviSstVvSYRJHqgGCnzXXc75xYh1Lwt1Y X-Received: by 2002:a17:90a:680d:: with SMTP id p13mr13628412pjj.39.1644832809265; Mon, 14 Feb 2022 02:00:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644832809; cv=none; d=google.com; s=arc-20160816; b=ypzHw2mMZt82pwY71bsGpWQWjNHrb9eblLoSf4fJB6Dhl+icjglprVg3+S2/GUaKqf KNkL4KrqT+VbHX3CAwD5oWfmvIivUZTSrCtnClyNIB/OGc4gj/CX9KoMg/MCG0dOlwfW wi07JxYoWK3trLRIRcgAONfIRAiUTFoxeZAqTdT13bdPIi5TM4yo2ja4GJyP5Fy1h2TX mYnFptisem8oHYlUUliatDOeE8yygneXf0fGS9WaWEdZsXyZcb3n52BIqONMu0xSPfY3 AceIUJdlh4E6M7NsCQaBxuzvaAbdePDZlmo5Hag3Fmq0RCOI2OMMqf/02lbrV74XBAmq wBBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=h0JP709O9eQRvYaHcZW5ywH5vkUoeEc9HEo34GT5kVU=; b=GLKarZ8ncmVGuvfet4y0yDIYVkrn7Ej5mO3fJjUcCKz/zuofxVBN+MGqRKI0z6b1pa cvRs1HMVP/4OXApXDrUE8cCRI07ixFOXEVxfFOJ4OTbcWMVeB/YFo18h9v2dWnuR2fNO CUyrf4r3Bn+R5ZRqKKvorTrSSKDJyjezGK/jjeV9YsZ1/q7oNFwrPFrwR3Q8VncZe/Xd 50gCZhiw2yZ6p1eNMVUOah5gm2TiSmXwOfGJ0hw/vYvhae4t+WK8oHSBXEVU+tZeOpnb eGrAgX0wALrVO162suCBI6jsybpbSnNHgYYo9N/p1sDk4Hqk0EbVpJlVZW1+bLKgfQmt kQpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=KM16yQHt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b9si11669239pls.230.2022.02.14.01.59.54; Mon, 14 Feb 2022 02:00:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=KM16yQHt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240620AbiBNGdD (ORCPT + 99 others); Mon, 14 Feb 2022 01:33:03 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:42382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232182AbiBNGdC (ORCPT ); Mon, 14 Feb 2022 01:33:02 -0500 Received: from mail-oi1-x230.google.com (mail-oi1-x230.google.com [IPv6:2607:f8b0:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E3325623D for ; Sun, 13 Feb 2022 22:32:55 -0800 (PST) Received: by mail-oi1-x230.google.com with SMTP id 4so16342645oil.11 for ; Sun, 13 Feb 2022 22:32:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=h0JP709O9eQRvYaHcZW5ywH5vkUoeEc9HEo34GT5kVU=; b=KM16yQHt1UQm3xp/rwQu+bJ+52ngVLufsAiYc2dhsQKBY+q32Fs12Vvrev/hiKkPCj yXJ/TWaG3C9z2O58D2cbi4+5wsJNFbflgCcSkMJeTyopITHZJXlKDNAvTy+0ZwxJPgwh J6LNq1E/USRp5cbW2XOAhcIjmIMumYGISzsMsEoKHi6t5Mt3LsPUwMcleFYJCHHS+cuC 4LoL0+A+shY1VtADWU6Vl6k3EmusJcOwANaUxeZTV+rkHBHnVjmFfLW276bwqaLNowbN GLh0oOqfHJaw6NpjDcRdnl24ka7nsy57bn/CtNJ7/vFAXdGt0X0aRGT+IlFrj7tSf8Fm T6PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=h0JP709O9eQRvYaHcZW5ywH5vkUoeEc9HEo34GT5kVU=; b=pO6W0u0Zr0Un465MnXLBkUe/WXypIF5e+bUJXPkZ0SsBYBU4UtzC/qiFoavTUaV2H5 LMNYLjFdAA7srvNKiEhHDGxgTnD9N6D6Nxme79bsu1ciPIhonURl+5QCGY5bHwEVrFJL GuT0jEVxP3sG7TLu9im5ExJnKfcQceICCYu3BWuY4+WyxlAMFd305LXwfe8jwzJLv1Mw e6dtxbdhm/QmrOislL7JinVnrCw+d5jpB40lvibfof9NiDflX7GcHc6Xl1ihCo+Vjn/p wUR9dmh63Fa7VuQzlQAKwqQAeLuhTnXYL3ZZ+9bJg6IVhyHO2Ok57lamMkV2TlGzfF4B CIZA== X-Gm-Message-State: AOAM533ZaBIsQSlxHeN3KD7bV+Al2vJoK+GH6krXz6oRuAo5AgIAjhBT pKHKyZ25hVri2SjLl0hbOxPYHA== X-Received: by 2002:a05:6808:2112:: with SMTP id r18mr4983152oiw.20.1644820374805; Sun, 13 Feb 2022 22:32:54 -0800 (PST) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id x17sm12066099oop.1.2022.02.13.22.32.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Feb 2022 22:32:53 -0800 (PST) Date: Sun, 13 Feb 2022 22:32:41 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@ripple.anvils To: Vlastimil Babka cc: Hugh Dickins , Andrew Morton , Michal Hocko , "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 07/13] mm/munlock: mlock_pte_range() when mlocking or munlocking In-Reply-To: <2ec49f65-fe4e-26a0-4059-c18e6dab0af4@suse.cz> Message-ID: References: <8e4356d-9622-a7f0-b2c-f116b5f2efea@google.com> <8bc3ee8c-7f1-d812-7f22-4f9f6d436bc@google.com> <2ec49f65-fe4e-26a0-4059-c18e6dab0af4@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 11 Feb 2022, Vlastimil Babka wrote: > On 2/6/22 22:42, Hugh Dickins wrote: > > @@ -162,8 +230,7 @@ static int mlock_fixup(struct vm_area_struct *vma, struct vm_area_struct **prev, > > pgoff_t pgoff; > > int nr_pages; > > int ret = 0; > > - int lock = !!(newflags & VM_LOCKED); > > - vm_flags_t old_flags = vma->vm_flags; > > + vm_flags_t oldflags = vma->vm_flags; > > > > if (newflags == vma->vm_flags || (vma->vm_flags & VM_SPECIAL) || > > Nit: can use oldflags instead of vma->vm_flags above? Yes thanks, that is nicer, I'm making that change now. Hugh