Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4889367ybf; Wed, 4 Mar 2020 12:47:18 -0800 (PST) X-Google-Smtp-Source: ADFU+vsUhghy5HuXR7ZCW1md9I9C4KIljf4R81XF75GSJkyr8eqjG+J1ntd+MHamk174m7E0XklV X-Received: by 2002:aca:7297:: with SMTP id p145mr3140111oic.120.1583354838445; Wed, 04 Mar 2020 12:47:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583354838; cv=none; d=google.com; s=arc-20160816; b=Ob7UDqI/uFG69N68kGJi2PcdTNaZsti8yO2Tm3gaXXIpGM/NMqWEpnlHbYcOlKvifD PvRsb5FvSK0tK4dyYBoBc4rkXbXizJNiuNFQyz4B4Jz2CNLPCXBMr6E0l4pqITPUVYCO n/nq5YSgeWduR0C7plBwJZRRB8EXTjT8fE5pHnqFZe7NbjOZrDh3HkKw8bu1rx34Zh0x aLaxQhcSpEAD2kvkblUqUFL/ko5VoSX9A9iyDtOtuNTndN9Yhk2rz9w2Saiywtn0FTZ1 gbk8jw4ZxQF2rjmer6dBmFiX1dCrSrKwifvmPhJbg2r1qw/d9V8j9no8vr47XSuOrzuM TO+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=bSssoW6aFVtYbqfH2RQfHGPyl30tcb1D7T0IFzp6CiQ=; b=gdLzBrp29W1lOWUJZDNTeQ6V0+H8Zz9edZv8Wtt496dhZxZI//DNRmmZd6eTt4X1Av 2ep9TiuZsCnVIX7f1IcVUYEXSNTdBDjaI84heTgoULBRkXgSE6pjJcf7R0xS0BDdb7MV Ua626X992SY/zmDKXiuDwBTNm/KKeH4FpMFY1S+C2sWWCzvEiDPVUBnUKJ69MQgAokrt mjCdvY5+hbzU/95udZZ1Vlgv7dAOm6EXksYvxyneZM89WpujeJ8Wu23gG6xQq8pxWk/E vOnQsCKk5tgwXOpiRVg0ST7pdGfSMUVZzDrN3AkuVdguFFcpX0Y3m6qlh8PVoDDdNtXD dQJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=wHrZLvAt; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y186si1815110oig.241.2020.03.04.12.47.04; Wed, 04 Mar 2020 12:47:18 -0800 (PST) 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; dkim=pass header.i=@google.com header.s=20161025 header.b=wHrZLvAt; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387718AbgCDUpa (ORCPT + 99 others); Wed, 4 Mar 2020 15:45:30 -0500 Received: from mail-pj1-f65.google.com ([209.85.216.65]:40623 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727528AbgCDUpa (ORCPT ); Wed, 4 Mar 2020 15:45:30 -0500 Received: by mail-pj1-f65.google.com with SMTP id k36so1442657pje.5 for ; Wed, 04 Mar 2020 12:45:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=bSssoW6aFVtYbqfH2RQfHGPyl30tcb1D7T0IFzp6CiQ=; b=wHrZLvAte9VBOVY1o96UtBWoPp1ikUjEojHSDjOxtEbBQ7U3yONVGuEruSLMWYhwhI q+iSE8ArSoDUE5cxh/3eNyyBmYM8CDIjGHICFoQlFIunjSF8GlNWqHRlmwKcx8HXb631 kJcM5NIauzZDt17vhBzDcSmQCXDDNhoaG8DqO46SmgdZvPknArsV5a7KzIm0vb1DTDWt /sHKASxd4Xiez8aFydm0594os17orXKGBmD3tRimTGrK7Wo5ih1RTI2Cemg4rhTFRwjq FbjERSDJNnJcc0FAeNiWQj9p5XYyrdZPd2+J/NK/stuQL8Cs+32C1vM65GwMv2hr6uZV 8f0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=bSssoW6aFVtYbqfH2RQfHGPyl30tcb1D7T0IFzp6CiQ=; b=n15BDtQ0Rk3gPTOM4NcWVJFCYwUP8Y8JS+z9Vj1Gq2D2B4Cf5N9GW3hrRS7IpVCTQh 4Qnaa2ISe7cZcM+NIg4oWR+os+ycFlIsuTjXGiLa2CFScFp7W6GQj23TcApoOprccMDS BV5hspgMiRzeoPpfaMY/2UgGH3tUbjHQlkZYbMAJdbn2er+XzR5nbRyiEROoufwgRI9Q UUfpBqef/XPhPl+UJiowVzay+j8DqAzE+UBkkrN5RRLuvAjfs2logIB2egLzg7rfXcK+ WSIsBb7jeOXShs1MuxyU4NU48V7lR/ZSi3ck8mNCKZwlCOqlJh8RL1u79KpmFRCOXJla 07Xg== X-Gm-Message-State: ANhLgQ0rFaxDmiJTDGAnh/0U5ED6eYVUno7x/oS2V6Ha/XenBiMjByyt qwvnNkIva6T6kGtFIZ7pkCJPiA== X-Received: by 2002:a17:90b:19cf:: with SMTP id nm15mr1503230pjb.69.1583354728838; Wed, 04 Mar 2020 12:45:28 -0800 (PST) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id b9sm528776pgi.75.2020.03.04.12.45.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Mar 2020 12:45:28 -0800 (PST) Date: Wed, 4 Mar 2020 12:45:27 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: David Hildenbrand cc: "Huang, Ying" , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Dave Hansen , Mel Gorman , Vlastimil Babka , Zi Yan , Michal Hocko , Peter Zijlstra , Minchan Kim , Johannes Weiner , Hugh Dickins Subject: Re: [PATCH -V2] mm: Add PageLayzyFree() helper functions for MADV_FREE In-Reply-To: Message-ID: References: <20200304081732.563536-1-ying.huang@intel.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 4 Mar 2020, David Hildenbrand wrote: > In general, I don't think this patch really improves the situation ... > it's only a handful of places where this change slightly makes the code > easier to understand. And there, only slightly ... I'd prefer better > comments instead (e.g., in PageAnon()), documenting what it means for a > anon page to either have PageSwapBacked() set or not. > Agreed, I think any changes to clarify what PageSwapBacked means when it's set and when it's clear for PageAnon should be in the form of a comment, likely in page-flags.h. That's currently lacking for lazy free pages.