Received: by 10.223.176.5 with SMTP id f5csp519740wra; Fri, 2 Feb 2018 01:35:46 -0800 (PST) X-Google-Smtp-Source: AH8x226cjI1EfqC2VqkUJmxleGq8NQo4mPkd3UBbmyRioSXQqQU37R7SmZau/S22EsVcjvdbE8TI X-Received: by 10.99.116.9 with SMTP id p9mr893662pgc.437.1517564145891; Fri, 02 Feb 2018 01:35:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517564145; cv=none; d=google.com; s=arc-20160816; b=OwFS2HpeaHSAO7hSGjKut59JsKpPJ/C6RWGUUFsP29+dVYK1KBEXoIvttXYijq/NC7 qtjXlXgoTvkAXFKT4uraoV8fZrz2ZBFUSe/froTIKQSnvqr4Lvbpnw7m8blTGnxkG6fH ZRmqMTYUyaiYS+nmAd0EoFcswEku8BvA21nkv/AiX+COoK8PNh6y1X/lIhTAoWv6A3H6 cBLes4WvMmqz+53drUvrGulbrpBpOCkmw/zE2pe3ll3YGKKeOoWehDFcCmz1mODqG994 7j7zs5XGKWk2P7TSQXdd4cbMYwfYMdb3t0e54iTNlaVrNEygyRTHz9BIbUaz0uk1A4j7 5akw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:from:cc:references:to :subject:arc-authentication-results; bh=Yr9d5PTmZ/IO5fhEzBzLVwGwajGby6K8+mrvh2YAXNc=; b=fX4gCqbT+1D+rs4xGOMp1OJvngucXcakbeUb3LKEcaMPNd41XpBBnHjEUpH/TSb2Pz PEr4Daj4/zVLVS7jbpQwXu2exWIoEFtgBbDifHgiIlEXyxgb/RnYAT730fsr1eOYcQa0 L5ij9P+gYt6j/Y6c0Yhm7/fIZRrSEBRn2bvgxyFS/LJ9syqdU88uqhRhRxrHdo82bN1m xCRPdhzVLGGOEU9jBCJuXuqPJk1bSmp7pQYP/9210D/Gakc/J6DUaAI4X54skDMgjc8g 1SMNLIEs2snc6Cur7CGNg6TIARrWx8kX/CDgvtPUsCN3GzCpP87zVTfjFm+IJ9bxTiDA Er3Q== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f75si1449055pfj.256.2018.02.02.01.35.31; Fri, 02 Feb 2018 01:35:45 -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; 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751956AbeBBJdu (ORCPT + 99 others); Fri, 2 Feb 2018 04:33:50 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:60810 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751788AbeBBJc7 (ORCPT ); Fri, 2 Feb 2018 04:32:59 -0500 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w129UBPv039384 for ; Fri, 2 Feb 2018 04:32:58 -0500 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fvm79ufr9-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 02 Feb 2018 04:32:57 -0500 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 2 Feb 2018 09:32:56 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 2 Feb 2018 09:32:52 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w129WqV449283250; Fri, 2 Feb 2018 09:32:52 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C7C8052045; Fri, 2 Feb 2018 08:25:05 +0000 (GMT) Received: from [9.202.14.107] (unknown [9.202.14.107]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 6478C52041; Fri, 2 Feb 2018 08:25:04 +0000 (GMT) Subject: Re: [RFC] mm/migrate: Consolidate page allocation helper functions To: Hugh Dickins , Anshuman Khandual References: <20180130050642.19834-1-khandual@linux.vnet.ibm.com> <20180130143635.GF21609@dhcp22.suse.cz> <53cf5454-405b-a812-1389-af4fd7527122@linux.vnet.ibm.com> Cc: Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org From: Anshuman Khandual Date: Fri, 2 Feb 2018 15:02:49 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18020209-0040-0000-0000-0000042BB65E X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18020209-0041-0000-0000-000020CF5A74 Message-Id: <2fe9bab9-d35d-e3fe-418a-41ab8f981ce8@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-02-02_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1802020114 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/31/2018 09:56 AM, Hugh Dickins wrote: > 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. Makes sense. Will probably just change the helper names to something more meaningful (from previous suggestions in this thread) next around.