Received: by 10.223.176.5 with SMTP id f5csp504292wra; Fri, 2 Feb 2018 01:16:56 -0800 (PST) X-Google-Smtp-Source: AH8x226NU0dh8fQD/9CF8m0Y+pHfmC91DA3TRQE3eCzo6v1soI5x1NwfaA5E09COqN2Lti/71ouS X-Received: by 2002:a17:902:42c3:: with SMTP id h61-v6mr34361376pld.269.1517563016292; Fri, 02 Feb 2018 01:16:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517563016; cv=none; d=google.com; s=arc-20160816; b=v4Plv562qW0TdtqQRnyLNimGoVujj96L2agXIZTbHq9enh5pZIQgGQ9b+TdRt74AQX UtJYRgC2fTFwlG+2xu0ql7o2EIBxqBG2tTYQRw2UY+XOY4O/C4Q3pgSJml2Uk3uaWZca 3KR2NQBacABJszmE30CsQHNlkO22e7ZaGE3yavgygkyACZiRb0ALEkRg9cEQX+J/sCkc ++I0BpG+gZNBVHrpP4Roieh1Jml3FEM7D1DuOH9wIwCD3+9hI1DWwjEF4MHGB8mlBIcA /x3mwOodLb52QJTB89NJzsxL/7slhRukTx8QMm1aTEE+mdAn8gvJt1h/6I6gjSDJTIpy UAvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=ibKZZ/ujnTvHpgxK66kgUqfD/JKvb+aIcZH8BUfxO2s=; b=HXngrMlqoYAEBjlldn1Y5akpXkkijOavCk4xNRGzLm321E3+h9d8v1dze8i3afOB5H B3O1+4w9Y0DWwnbz2PZDvAA4MQWtoshviFjpARpnnKYDYbWV3MJ8xjDTVU9Bg5ubeBSk xCHGBPeg2nqKzdLKtR1te2+t+uF5wVhlkLlHfV2TpGn49PxPGH/3iP536xVPHSsPCL8D tLBsWaNl8Tngba2GhIAChu1TEBS9F5FMwmEojKmOJCJvsERHPCxHnMyuhA6aIYOXOu5z 6OuFn0OwWtP3oKsyPTb+inuiJMAcuLk/vMuW0PfDauiVPVx5Z3E9Do/HbzhPxL3q2/2u e9Qg== 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 71si1433763pfm.214.2018.02.02.01.16.41; Fri, 02 Feb 2018 01:16:56 -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 S1751956AbeBBJPj (ORCPT + 99 others); Fri, 2 Feb 2018 04:15:39 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:39130 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750799AbeBBJP1 (ORCPT ); Fri, 2 Feb 2018 04:15:27 -0500 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w129Aj4v042576 for ; Fri, 2 Feb 2018 04:15:27 -0500 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fvjyp5m26-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 02 Feb 2018 04:15:25 -0500 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 2 Feb 2018 09:15:23 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 2 Feb 2018 09:15:21 -0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w129FKn364159942; Fri, 2 Feb 2018 09:15:20 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 14FC9A406E; Fri, 2 Feb 2018 09:08:51 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E45EDA4053; Fri, 2 Feb 2018 09:08:49 +0000 (GMT) Received: from dhcp-9-202-14-107.in.ibm.com (unknown [9.202.14.107]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 2 Feb 2018 09:08:49 +0000 (GMT) From: Anshuman Khandual To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: akpm@linux-foundation.org, mhocko@suse.com Subject: [PATCH] mm/migrate: Change migration reason MR_CMA as MR_CONTIG_RANGE Date: Fri, 2 Feb 2018 14:45:18 +0530 X-Mailer: git-send-email 2.9.3 In-Reply-To: <20180130030714.6790-1-khandual@linux.vnet.ibm.com> References: <20180130030714.6790-1-khandual@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18020209-0040-0000-0000-0000040BAA57 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18020209-0041-0000-0000-0000260F4DA4 Message-Id: <20180202091518.18798-1-khandual@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=3 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-1802020110 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org alloc_contig_range() initiates compaction and eventual migration for the purpose of either CMA or HugeTLB allocation. At present, reason code remains the same MR_CMA for either of these cases. Lets make it MR_CONTIG_RANGE which will appropriately reflect reason code in both these cases. Signed-off-by: Anshuman Khandual --- arch/powerpc/mm/mmu_context_iommu.c | 2 +- include/linux/migrate.h | 2 +- include/trace/events/migrate.h | 2 +- mm/page_alloc.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/mm/mmu_context_iommu.c b/arch/powerpc/mm/mmu_context_iommu.c index 91ee2231c527..4c615fcb0cf0 100644 --- a/arch/powerpc/mm/mmu_context_iommu.c +++ b/arch/powerpc/mm/mmu_context_iommu.c @@ -111,7 +111,7 @@ static int mm_iommu_move_page_from_cma(struct page *page) put_page(page); /* Drop the gup reference */ ret = migrate_pages(&cma_migrate_pages, new_iommu_non_cma_page, - NULL, 0, MIGRATE_SYNC, MR_CMA); + NULL, 0, MIGRATE_SYNC, MR_CONTIG_RANGE); if (ret) { if (!list_empty(&cma_migrate_pages)) putback_movable_pages(&cma_migrate_pages); diff --git a/include/linux/migrate.h b/include/linux/migrate.h index a732598fcf83..7e7e2606bb4c 100644 --- a/include/linux/migrate.h +++ b/include/linux/migrate.h @@ -25,7 +25,7 @@ enum migrate_reason { MR_SYSCALL, /* also applies to cpusets */ MR_MEMPOLICY_MBIND, MR_NUMA_MISPLACED, - MR_CMA, + MR_CONTIG_RANGE, MR_TYPES }; diff --git a/include/trace/events/migrate.h b/include/trace/events/migrate.h index bcf4daccd6be..711372845945 100644 --- a/include/trace/events/migrate.h +++ b/include/trace/events/migrate.h @@ -20,7 +20,7 @@ EM( MR_SYSCALL, "syscall_or_cpuset") \ EM( MR_MEMPOLICY_MBIND, "mempolicy_mbind") \ EM( MR_NUMA_MISPLACED, "numa_misplaced") \ - EMe(MR_CMA, "cma") + EMe(MR_CONTIG_RANGE, "contig_range") /* * First define the enums in the above macros to be exported to userspace diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 242565855d05..b9a22e16b4cf 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -7622,7 +7622,7 @@ static int __alloc_contig_migrate_range(struct compact_control *cc, cc->nr_migratepages -= nr_reclaimed; ret = migrate_pages(&cc->migratepages, new_page_alloc_contig, - NULL, 0, cc->mode, MR_CMA); + NULL, 0, cc->mode, MR_CONTIG_RANGE); } if (ret < 0) { putback_movable_pages(&cc->migratepages); -- 2.11.0