From patchwork Sat Jan 16 00:31:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Kravetz X-Patchwork-Id: 12024433 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09F11C433E6 for ; Sat, 16 Jan 2021 00:34:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8CF9A229C9 for ; Sat, 16 Jan 2021 00:34:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8CF9A229C9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E55318D01FA; Fri, 15 Jan 2021 19:34:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E05D68D01F6; Fri, 15 Jan 2021 19:34:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CF4038D01FA; Fri, 15 Jan 2021 19:34:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0109.hostedemail.com [216.40.44.109]) by kanga.kvack.org (Postfix) with ESMTP id B92588D01F6 for ; Fri, 15 Jan 2021 19:34:55 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 89F33824999B for ; Sat, 16 Jan 2021 00:34:55 +0000 (UTC) X-FDA: 77709768150.23.straw11_2d16c4927533 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id 6F71237604 for ; Sat, 16 Jan 2021 00:34:55 +0000 (UTC) X-HE-Tag: straw11_2d16c4927533 X-Filterd-Recvd-Size: 11023 Received: from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Sat, 16 Jan 2021 00:34:54 +0000 (UTC) Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10G0Tpno159448; Sat, 16 Jan 2021 00:34:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : content-type : mime-version; s=corp-2020-01-29; bh=1VSral5slTfnXXmuTxnnikW0TTbs3czo2gmUidK7An0=; b=jAGS5vZZJCMekYg1wvD+g9+dd9rbkCZGGca3F1AuG1zXXueNbLj214rj3kD9/uCLg5NI LwGHqpn4c+/OSezs3vMFi0XHEF+s8X0Qeq42kGCp8F2FW1hSzBpZrylL/e4Oe9nSzD5u 9+Ii0Qer+Co/9lRc2LYtJxhwB1ViD43EeNKQe7piitGPunk4lowX8P4Azt1/lhEllrAb 1qzMyAkXL4O1q9nu9doYaLX/0ECKrZ6sPz//nIyIoVLejGsBhB22ZaHsB0ME9Rdbxi0S i+zaSaZKWmPirhpWyNbewQI/PwT0aL5kJRwuMfq+4bUss1i3ko9E/RFg0zlS3bR04kh2 fg== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2130.oracle.com with ESMTP id 363nna806q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 16 Jan 2021 00:34:48 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10G0WliO099849; Sat, 16 Jan 2021 00:34:47 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2173.outbound.protection.outlook.com [104.47.57.173]) by aserp3030.oracle.com with ESMTP id 360kf3yqbk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 16 Jan 2021 00:34:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fyXPwbrOAzCZglzRvts8GOrH+XFAS/CaiftEocLhb6KLBa2zTlI+s+Zih850In8IKFxFAnaRfZqvqCq64GwSpaLGIekQjIgLD9DrmKbLEv6FjPVRP3UB3nKYqyiU0oEQjcA3pOnOCAdIY4NBhM6IB8KIvoLcp17BtAYRxaW3pjxRyC0A9AaMnXezHgdgxkHZOAlxUVF49OMTmNOGZd8QebYrB0lA/KbrFbje6p9ea/0dawxqIsqlT1xMpvqp0uRW+ig5KevlcqAUi+KAC+W3+0NSHwhREfo13WqxkOy2/WkLerFhwCV+qIbV/hLKuMVREzSU0zslog9vGxD4ig4K+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1VSral5slTfnXXmuTxnnikW0TTbs3czo2gmUidK7An0=; b=Hre+GfIw42bZhcxKgn08NNO6cavrNmjerH8ug1jzLyOGxJZGwQd5mo7QZx5Vh2B85zYvXBpD/76lCbQiuTgg1zQE2SCJv4C8Ljez9T76uAjTL7Bl322ArzzhhUFornf1h0MA8hPBS/CQOK6S8iF1bR81szCycIDfiIqau8XWhHrjm41Iz5MvEBsVEyBv7fsSXb4b0N23vldbg7esQ7UT/Bor5DpgWUDFvFSgHegfkZOmkQB+24aT1VbyNdv3dLOxfA9TlBn0n8IliEBFGRKJbU5izN5ind0uf2IGx7LN8efxDxGaEQ/Sd17TwCNqaqLlk5dwTJTzChgi3YrKaWkeHQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1VSral5slTfnXXmuTxnnikW0TTbs3czo2gmUidK7An0=; b=hT2QW+OSuN5ubR3HulVKqIA0xw6ASIp9+wQjLxBZluWDGSHXsW2a0BNCyL4FoPiegTUuo0P9eHyNMRIbBWAcnxg2psd9zByth26lKJmpc0AhMtvHzXwZ7zbj8Q11+p0PDiy5RHctPgpvKn6EJa2kgFIh2lNE9heEa2Y+gdqxA9g= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=oracle.com; Received: from MWHPR10MB1389.namprd10.prod.outlook.com (2603:10b6:300:21::22) by CO1PR10MB4450.namprd10.prod.outlook.com (2603:10b6:303:93::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.10; Sat, 16 Jan 2021 00:31:20 +0000 Received: from MWHPR10MB1389.namprd10.prod.outlook.com ([fe80::897d:a360:92db:3074]) by MWHPR10MB1389.namprd10.prod.outlook.com ([fe80::897d:a360:92db:3074%5]) with mapi id 15.20.3763.012; Sat, 16 Jan 2021 00:31:19 +0000 From: Mike Kravetz To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Michal Hocko , Naoya Horiguchi , Muchun Song , David Hildenbrand , Oscar Salvador , Matthew Wilcox , Andrew Morton , Mike Kravetz Subject: [PATCH 0/5] create hugetlb flags to consolidate state Date: Fri, 15 Jan 2021 16:31:00 -0800 Message-Id: <20210116003105.182918-1-mike.kravetz@oracle.com> X-Mailer: git-send-email 2.29.2 X-Originating-IP: [50.38.35.18] X-ClientProxiedBy: CO1PR15CA0060.namprd15.prod.outlook.com (2603:10b6:101:1f::28) To MWHPR10MB1389.namprd10.prod.outlook.com (2603:10b6:300:21::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from monkey.oracle.com (50.38.35.18) by CO1PR15CA0060.namprd15.prod.outlook.com (2603:10b6:101:1f::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.11 via Frontend Transport; Sat, 16 Jan 2021 00:31:18 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 16b1fa13-7e58-4833-872a-08d8b9b60aeb X-MS-TrafficTypeDiagnostic: CO1PR10MB4450: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Oa3yJvHtjDXXJtOzTjPFyOW5P7jYhvztY6Ds5hR24fTIIGNe9PR+XiOG14CfPfVxADK9ZP2LERdi63u5ioZSF7mVylo/ECjfe0jjLajPpl9rc+l3MEos4CCN5O+mjJpnpNqw15Sy7rMMyTNqSgySpsl42iK6zMm1cFKqEqJeI4eUmqKjwoV8xJKxo8YcKPh+QkTREA+BlPwYOmmXmMjJ8S78cj3MUTUnY10tn4IQKmsFaZL4FQittbgO5PNarldlrggFUGmOaMnvThhAfjXLed0O/KFoyeAp6tmi2oRrGj7qYWeO24R1X0W+NB+d0K6KZIM0qbqjchFfjKaoUW+BIBhX7qwQxtxQB8fuQf7KVtHjtfqv5g2+R1csWxuMX5eo67oJ5hovo86yYfVY+yw1CpyiPSCSpFl0DBIAtexv7FHFqDeil0gRjm5+uwXBAesXcWFtddEkV+2lQ7ytZ5TBmw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR10MB1389.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(376002)(396003)(39850400004)(136003)(346002)(366004)(6486002)(478600001)(1076003)(6666004)(86362001)(966005)(36756003)(2906002)(44832011)(316002)(5660300002)(956004)(8676002)(107886003)(16526019)(26005)(52116002)(4326008)(54906003)(8936002)(66946007)(66556008)(66476007)(2616005)(186003)(7696005)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: kgD3OB00sdO8fJ2l6hcY0s7jzD5e5R8RnuOxcSAO6Nrn3MM69meYC+lgpbECY38pLmbaq2/EVG9et8KuewHTgsf9NrwRmNRm2m4NidhiRlfl9ThUTQrzQAWPWKLJCEPZxQi9eS0L3BxXtQp0sV8DR05XIiJkbL50bOt6t+zs5Lq4AGyQ85MWL8ZRjZXpy/RZvgyBGUSZhFT7mqPusdSXL6os+5mdJ+kWUjQhIOB5l2SNuOu+vr/cARimwpiS63f3u0rcl8o9kyNVkga20WX4HuSRrYrmou58Dt9eiqLw4udF4J0lICQQaUmLwnM/56LftyNp4s1rDFodcvLU/CGhHC7jRAhXAQ3o3bfsMYf/20LjyjyrbJ48IjZhbF6GbauKJZP0uoCn/k4MpGwRmG0nemFBHXhQYz1LD/G1CxfNsm4qCJqiskJa2RMTzKIyHI3A00i490plnzdqaqRAhuQf8JX/ek6m+/dZ11OCZN2yJ31Owh++/l3Dmh2OCUVxfERi6LeWoQ3CWSobKzOmwiDmYUYUCFCoWzg6uP/OoVqui5DVMtIDuW/RNhy1V8ghPk/RFrZsYwOSREXH8KoVCaPCbTJT6wEUZa+hlp18BFGSc6XkKY7mwGclDomb8Fk/YoN2ZpWfvRNbs7ljiOutoO43in9k5kU7vLC//zyfpf3/CHq+fqc/QWM3qzklcF62t/Dk7nE63G/LC15yyLInIPcDoN8Papbz9sEXCGe91KamcEo+xwGBFeqozmChe8MEoHaCujyZCVKSHv8sjq360Px8pZroXbrNJTVYamRvpLIgLbnW3Y01ENejxD7FoJ3gPNcOnfnn8TgeKPt3hdD9dKmRirNMdWXRlPVaLhVMLaU7mAxJqbXwIfBLKTw0yNthB8U2rwyEQHKrOxzv/G9nIfmeVGBEK2x3Yc7h28su7kqNTD8Ka+QFLzv6OyNdclJYhjtpDQ6vogkDuGLM1meiWjHk3eFbV4nXlFihC1GUy6AHhRk= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 16b1fa13-7e58-4833-872a-08d8b9b60aeb X-MS-Exchange-CrossTenant-AuthSource: MWHPR10MB1389.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2021 00:31:19.8456 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: EttWk788AePFSNdct/JbWJWljQGerL2EOu7FRhlUSZPWCFJbLOjEzVVKpQ3Bt3W2t+7sObIOx/8lc+JpphFexw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4450 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9865 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 malwarescore=0 suspectscore=0 adultscore=0 spamscore=0 mlxlogscore=504 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101160002 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9865 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 impostorscore=0 spamscore=0 mlxlogscore=663 clxscore=1015 bulkscore=0 adultscore=0 lowpriorityscore=0 suspectscore=0 phishscore=0 mlxscore=0 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101160002 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: While discussing a series of hugetlb fixes in [1], it became evident that the hugetlb specific page state information is stored in a somewhat haphazard manner. Code dealing with state information would be easier to read, understand and maintain if this information was stored in a consistent manner. This series uses page.private of the hugetlb head page for storing a set of hugetlb specific page flags. Routines are priovided for test, set and clear of the flags. [1] https://lore.kernel.org/r/20210106084739.63318-1-songmuchun@bytedance.com RFC -> PATCH Simplified to use a single set of flag manipulation routines (Oscar) Moved flags and routines to hugetlb.h (Muchun) Changed format of page flag names (Muchun) Changed subpool routine names (Matthew) More comments in code (Oscar) Based on v5.11-rc3-mmotm-2021-01-12-01-57 Mike Kravetz (5): hugetlb: use page.private for hugetlb specific page flags hugetlb: convert page_huge_active() to HP_Migratable flag hugetlb: only set HP_Migratable for migratable hstates hugetlb: convert PageHugeTemporary() to HP_Temporary flag hugetlb: convert PageHugeFreed to HP_Freed flag fs/hugetlbfs/inode.c | 14 +--- include/linux/hugetlb.h | 81 ++++++++++++++++++++ include/linux/page-flags.h | 6 -- mm/hugetlb.c | 150 +++++++++++-------------------------- mm/memory_hotplug.c | 8 +- mm/migrate.c | 12 --- 6 files changed, 137 insertions(+), 134 deletions(-)