Received: by 10.223.176.5 with SMTP id f5csp832268wra; Tue, 30 Jan 2018 20:30:44 -0800 (PST) X-Google-Smtp-Source: AH8x225ROrOs7wSEUPyBlSlmY+4ndevzBjUXpaSq8WESfLRhk5ngLK74KcVsw4AUvaoAuECJRiIz X-Received: by 10.98.63.93 with SMTP id m90mr32405643pfa.231.1517373044354; Tue, 30 Jan 2018 20:30:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517373044; cv=none; d=google.com; s=arc-20160816; b=ESNoWJXDkGIofzuSHR3n+LAGTBK114kR67yhiR71qA/sKBMFKZ9K9hQTbJEcrW+PRE 9vtHb0G4Io/zAMBFXw2YdhcXgLjuMixdyFK1nvST3aAxC+AdK28P0FFExfQCIkvH2sak XpJa3PEdoLkR9T9HacGd1reXqzfyvTuQoD+eT0iK0bzF9syYcgQBwnC10UcxpU5L3CIG R5+ZPcXhBusOzvCl4B6kDMXZ11wsPcNoVzez5m5t/rOHSVYRK7qtejeWOWDiGvgGPiLt vGcmcZI3fQEWXyrVP1cefyQU8OfZcfXx0tJlG5bOXrvohnJA24SJK8FvfXNwYFAqj5E6 2Nmw== 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 :arc-authentication-results; bh=1B1rpsnBqjTye5HsBVb4C1P/0EIeW3uc5PQc9v9bglo=; b=uGdhBT78/F0TjdLNk/GA6BJKutG/qFs/NBVrXGY+spEgJHox9ycglRcl4itSzGXxu3 WKTmFI7We1gx1njjS7nNZ8nZI7gHrSADERt8g8OsHkDNnsfQWcypvukO2UUp1pu1R5Al 5TyaGu02HPS0aGQO+W1PNHRcyIH787u1RJ/QdGNAyq2wZUAlVyVKdOAZ0gH8fEkfcciK I0ar3AFupL3Dt3k6C0O43pvpShE7WqWK2nmQQkXZzuuDMTkxWWyfB4bKOmgDRKMjCka3 to5sDZk8e5VhI41eiRvIs9E0ENuawLPpT67hCFTEiJmICX4rrEjNmDf3m5/GXUY+LQtT dKZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=XjtnHgN5; 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 u6si4035001pgv.586.2018.01.30.20.30.30; Tue, 30 Jan 2018 20:30:44 -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=XjtnHgN5; 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 S1752488AbeAaE0a (ORCPT + 99 others); Tue, 30 Jan 2018 23:26:30 -0500 Received: from mail-pf0-f172.google.com ([209.85.192.172]:34734 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751635AbeAaE02 (ORCPT ); Tue, 30 Jan 2018 23:26:28 -0500 Received: by mail-pf0-f172.google.com with SMTP id e76so11376973pfk.1 for ; Tue, 30 Jan 2018 20:26:28 -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=1B1rpsnBqjTye5HsBVb4C1P/0EIeW3uc5PQc9v9bglo=; b=XjtnHgN5QzIZZxHdN7MHWU0Q/20fdNN4pNFJ2f/nwN46pfnQT1X2/2X1M6+EWBiBW6 /tSSqxfI9DW26+CqabpaFsne105Fr1WSvpEx7waDLMxtm4UaUZpy7JlbNveDoP5j58Go 7ZePjgQQmCjwuGThkBp/Z7Tpthd79+5LpiwgQOpO/LYSrUTSeDGur+p+SYqp6SZ9esdX hWnDm6ClOOcZQDhtgrRF1GmLOLg3pZekaxgm0TA/EM66iY/9QpjOoQhmpZXFtNYAmC8y gtFt9O2mZJ7AMxqxi+jFNwtNTaZccIoYQU24TXz4nyapD/kB05uWMM9X4nwa9nlFQuOe i5uw== 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=1B1rpsnBqjTye5HsBVb4C1P/0EIeW3uc5PQc9v9bglo=; b=XjozVds1uKAHi7YAy45yRSj0iAgWZX7+y/dsBOZUEVP+3qxAOaBlKykclsuepDhEnQ HVYEWyMfShd81vEPjwSU9DEi7avFVLQjTlHxSkc0TZxcOP9r/Tm/1zoyZ27Ti2wMocbc 3fkn95tDjrmvdITIuFo9kJSGI4tTteWldIuNgW5O1gmhr8lGgHqNiAB3oWtvpeESiZCP W2EeC/kyhjhEJl5578rCsUBYaPKbVobDSCIyUjss3OEDH3fikLsOj/5kyOuA+sCP9u0X IbIHjl4LXcVDeofX+CObBy6H3JzVWPuMY7GhPYmJo+Vik+rHrhhx6Iw8v7UEQMAXzVly EhuQ== X-Gm-Message-State: AKwxytej6v7yOxRU3OWbL4MyjA4d1EEWBg0cP3WQrHrMMnqpGZRacKHt jSrJb8cCr6a3lY/lAmlu3ntxfg== X-Received: by 10.98.189.8 with SMTP id a8mr32376198pff.125.1517372787263; Tue, 30 Jan 2018 20:26:27 -0800 (PST) Received: from [100.112.68.66] ([104.133.8.98]) by smtp.gmail.com with ESMTPSA id a15sm39353872pfl.98.2018.01.30.20.26.26 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 30 Jan 2018 20:26:26 -0800 (PST) Date: Tue, 30 Jan 2018 20:26:19 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Anshuman Khandual cc: Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org Subject: Re: [RFC] mm/migrate: Consolidate page allocation helper functions In-Reply-To: <53cf5454-405b-a812-1389-af4fd7527122@linux.vnet.ibm.com> Message-ID: References: <20180130050642.19834-1-khandual@linux.vnet.ibm.com> <20180130143635.GF21609@dhcp22.suse.cz> <53cf5454-405b-a812-1389-af4fd7527122@linux.vnet.ibm.com> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) 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, 31 Jan 2018, Anshuman Khandual wrote: > On 01/30/2018 08:06 PM, Michal Hocko wrote: > > On Tue 30-01-18 10:36:42, Anshuman Khandual wrote: > >> Allocation helper functions for migrate_pages() remmain scattered with > >> similar names making them really confusing. Rename these functions based > >> on the context for the migration and move them all into common migration > >> header. Functionality remains unchanged. I agree that their names could be made less confusing (though didn't succeed very well when I tried); and maybe a couple of them are general enough to be used from more than one callsite, and could well live in mm/migrate.c. But moving all of page migration's (currently static) new_page allocator functions away from the code that relies on their special characteristics (probably relayed to them through a private argument), and into a single header file, just seems perverse to me. And likely to be a nuisance when adding more in future: private structures having to be made public just to make them visible in that shared header file. Would it make sense to keep the various functions that may be called by rmap_walk() together in one rmap_walk.h? The different filesystems' writepage methods together in one writepage.h? I don't think so. Hugh