Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp5263116pxb; Sun, 7 Nov 2021 08:32:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJzku9nUpe3DY2orIVIw3MSXkPZZ0kvBexhzlpxQrKrFsnNIH4AS2Wj2pQRQ/Zs8MdmpUskC X-Received: by 2002:a05:6638:25c8:: with SMTP id u8mr5067755jat.23.1636302756533; Sun, 07 Nov 2021 08:32:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636302756; cv=none; d=google.com; s=arc-20160816; b=HQLDSjDZe3IMqcKaHMlUcdTyYUa1ojaDQSGYAiw+RBIf66gewvT0eY9mzqwULOoJZS AOPpWv9+EBIdERrv3J36bnP0BzvbHrBMr3+JbFXecvHTWxvklV3PjYNi7uQr+pQZTtHa mvdRY/gnH4mFGCV8mBLibA8sB0tvMALUtMzIxj/n5wb8+tDHMJP6xBRRiXURo+LLtiBP KJo0I0WS6ZRpJRWSX2Ik5WDhPc389jezPx4TeUaVcw9A60EIEiQvXWRMAC7umY9jAVrc i3rA7ayNaCuGw/lcmgq6bB0GWbJAU9oFZKB/Duz5FsHmrjgR9DGb8Sfy5sIoAZICNLiG yvzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=w57msQfL3qe95g0qmf59OrAP0y5/xLbcFWpIuw/opDM=; b=uswo66XLJMNxPEjJdPB5mEv6+vOrDcID2QLkm1dx2ZZPAUqiKmYPqBtyZr+hzTUtIR Pj0NV67T1rHetTfukl0RVlBQ4pkvHHl117/ItT/AqQwMqD5jil2SVWKmBFIL3kHMXXfN 2gNc7es63iJ35xaLRwc9+bCF4PLQzPCHouOA6hK3DjJ2ijEdMczE30cqdrAm2DmUM/jI ldlE+ZF1IqVTtnHDQ4VlS7dVT/bPqrPIl0Kl/d6d2xntsOlwz2TIpXYeErrkEtXTkXoS ObM/ildhiuGxlKk8PYVBEzNuwAgXcEBWMVJVRTVcs83AI7gYaTT+ZvcGh2EwLqmY4UB7 5ORQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w18si12489473jad.68.2021.11.07.08.32.15; Sun, 07 Nov 2021 08:32:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235272AbhKGJAW (ORCPT + 99 others); Sun, 7 Nov 2021 04:00:22 -0500 Received: from out30-45.freemail.mail.aliyun.com ([115.124.30.45]:58230 "EHLO out30-45.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235249AbhKGJAW (ORCPT ); Sun, 7 Nov 2021 04:00:22 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R611e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0UvOAAGr_1636275456; Received: from localhost(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0UvOAAGr_1636275456) by smtp.aliyun-inc.com(127.0.0.1); Sun, 07 Nov 2021 16:57:37 +0800 From: Baolin Wang To: akpm@linux-foundation.org Cc: ziy@nvidia.com, shy828301@gmail.com, baolin.wang@linux.alibaba.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/3] Improve the migration stats Date: Sun, 7 Nov 2021 16:57:24 +0800 Message-Id: X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, According to talk with Zi Yan [1], this patch set changes the return value of migrate_pages() to avoid returning a number which is larger than the number of pages the users tried to migrate by move_pages() syscall. Also fix the hugetlb migration stats and migration stats in trace_mm_compaction_migratepages(). Please help to review. Thanks. [1] https://lore.kernel.org/linux-mm/7E44019D-2A5D-4BA7-B4D5-00D4712F1687@nvidia.com/ Changes from RFC: - Increase nr_thp_failed when THP is split, no matter how many subpages are migrated successfully. - Add reviewed-by tags. Baolin Wang (3): mm: migrate: Fix the return value of migrate_pages() mm: migrate: Correct the hugetlb migration stats mm: compaction: Fix the migration stats in trace_mm_compaction_migratepages() include/trace/events/compaction.h | 24 +++----------- mm/compaction.c | 7 ++-- mm/migrate.c | 68 ++++++++++++++++++++++++++++----------- 3 files changed, 57 insertions(+), 42 deletions(-) -- 1.8.3.1