Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp557673pxk; Sun, 30 Aug 2020 14:05:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4TUNoTl2oCEcgtT7He2ixQa9pUD+HNA4yXOWd5hViP1AeYgBcJ+UGGnJwvweoO4jt3Q0n X-Received: by 2002:a17:906:f1d5:: with SMTP id gx21mr5080705ejb.165.1598821542368; Sun, 30 Aug 2020 14:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598821542; cv=none; d=google.com; s=arc-20160816; b=Kp8jF8yfb0ePnZAysceJWo9Exc1Z2h8RWEYRD5+I5m4JswCWu68Hvpe8fN0WJYiASt yvvw+UnOnThrw1IfeEIMextAJXHIxP+WbbiajnNWautNyUzkF49pfHMAD1z8enym507n dEyhc7iMba0+YoNXKnBMBrhvrfleXxXfF3MW+IpbOaVKCzdQtPcndQwQ1r2SW+wWipIE eMted+geff2mbm1KcJ92SN5pRa1eVnHhkRUlCV3C3SxyR7dSGtem9Cf7yRAhAkN/mYRJ 6dFgtEcMhmapmCgtRJae5oCPWyc4+gCTjHB8zQftBlOllS7G3GGszeWArviUg7MbnAca yCPw== 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=0A0MgBvdZsn83Ew2Ktjq3B8TXEsbXPWHsWkGfR3n5Sk=; b=vCcUWVX+bcbExXAG985BKrNVeyzrtN75faz4/K8maIGME9v8UQqnCh8VZgrKthkQgG VNxn/5BvaLgT3cVQMhDpkkn/YNYrInsOW7wMPEbqKqKN01e9sDNcBECRINZCw44BrjpG HISN2kw5StBGSgB0S7kPCwBBcev4Ou/JIM1/L05A7p/33MLzeZRd1MEVOEpKCKPL7gL4 YM7wKju5ZzlM8x4zX1BUQaB0bpi14DERTlvPlJeVCqzs/8j7EbMA9mgmSql5pSA/dZ3C HnVaivCf9quXHq0r3Wbo5AXA8Mh+ARXOap17aSelsGHKRvB+XmKAhUWEyreJfa5ZYVV5 2KxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="oFyFWS/k"; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ay26si4018962edb.269.2020.08.30.14.05.19; Sun, 30 Aug 2020 14:05:42 -0700 (PDT) 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; dkim=pass header.i=@google.com header.s=20161025 header.b="oFyFWS/k"; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726412AbgH3VBg (ORCPT + 99 others); Sun, 30 Aug 2020 17:01:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726150AbgH3VBe (ORCPT ); Sun, 30 Aug 2020 17:01:34 -0400 Received: from mail-ot1-x343.google.com (mail-ot1-x343.google.com [IPv6:2607:f8b0:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A16FDC061573 for ; Sun, 30 Aug 2020 14:01:34 -0700 (PDT) Received: by mail-ot1-x343.google.com with SMTP id 109so3765739otv.3 for ; Sun, 30 Aug 2020 14:01:34 -0700 (PDT) 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=0A0MgBvdZsn83Ew2Ktjq3B8TXEsbXPWHsWkGfR3n5Sk=; b=oFyFWS/knp2ok2Qu0qsMN8fKLiiU0kOo/mIL5IkekajG5x9dgm1oAvakoa5SgfZHsu 1qzYznn+LwXijJPZS5UvQ28q4NzUqmQb5JYoYoaQQusdmgpdVzkKh2AOHSU9euxcpNYl omLFmPd1dP35wP+etXy3lmrM1uUlWvqnZPAKCuZ/k8Dno8MbpcvA8qEhhlhnzQXBYM+B ux5CuQ7sti0552QPWjIrs+ZMNYXdqpMx98JzBmfA6sPypX7LUj7UIwUjrVLfIvb3FIfd T5tlwA6YskZ2woohS40ycZRntDy8zFveF5niV8KmeDlng4hl5LLHWoI5KQ7NQ/26N/xN dVTg== 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=0A0MgBvdZsn83Ew2Ktjq3B8TXEsbXPWHsWkGfR3n5Sk=; b=GSaopekZDmVOIO8pWAfvvT8GbODh18n/WHTo0A/TvUi+eUtInCirSkatM0HYLGSrnL AHWf3KPDN2UAovTZYSsrWZKoCeHxd5sK6ScRk60jNod/BWwtn/ICwHi+CiRq7wr/T7pN hadZ1z6ojjgkZvpQNVnLkWQCDCo7vrnIJlIaLuhvVap8wuND1RFRieMyVTdPwsUkXHzr xbhGxnokfj9f4BaeJyr2qZwZCvtmgTz4uPt3uQ4rFvzmwRNzFYfDsr/zKrCw0CZ0IxKV tA55I4K4lDv9rLzVN4NmvNSwE/4vt/XTG2YyOBBqHBt2WaaEStqa0nnwdqO5/gwo/qfd B2pQ== X-Gm-Message-State: AOAM530mJEwwoTC6xE/umRRropFpYdfPLu13UoQjcvoAN5sb0mQ5g11p P7yYyeMS1pPwJy2GH3Lojt1xHA== X-Received: by 2002:a9d:24c6:: with SMTP id z64mr2594644ota.97.1598821293211; Sun, 30 Aug 2020 14:01:33 -0700 (PDT) Received: from eggly.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id m11sm281916ooe.43.2020.08.30.14.01.31 (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Sun, 30 Aug 2020 14:01:32 -0700 (PDT) Date: Sun, 30 Aug 2020 14:01:30 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Andrew Morton cc: Alex Shi , Johannes Weiner , Michal Hocko , Mike Kravetz , Shakeel Butt , Matthew Wilcox , Qian Cai , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 2/5] mm: migration of hugetlbfs page skip memcg In-Reply-To: Message-ID: References: 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 hugetlbfs pages do not participate in memcg: so although they do find most of migrate_page_states() useful, it would be better if they did not call into mem_cgroup_migrate() - where Qian Cai reported that LTP's move_pages12 triggers the warning in Alex Shi's prospective commit "mm/memcg: warning on !memcg after readahead page charged". Signed-off-by: Hugh Dickins --- This fixes a likely future warning, but is just a cleanup right now. mm/migrate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- 5.9-rc2/mm/migrate.c 2020-08-16 17:32:50.665507048 -0700 +++ linux/mm/migrate.c 2020-08-28 17:42:07.967278385 -0700 @@ -668,7 +668,8 @@ void migrate_page_states(struct page *ne copy_page_owner(page, newpage); - mem_cgroup_migrate(page, newpage); + if (!PageHuge(page)) + mem_cgroup_migrate(page, newpage); } EXPORT_SYMBOL(migrate_page_states);