Message ID | 20221104011632.357049-1-mike.kravetz@oracle.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C3A6C4332F for <linux-mm@archiver.kernel.org>; Fri, 4 Nov 2022 01:16:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5D8086B0072; Thu, 3 Nov 2022 21:16:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 560EF6B0073; Thu, 3 Nov 2022 21:16:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3B31A6B0074; Thu, 3 Nov 2022 21:16:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 248DE6B0072 for <linux-mm@kvack.org>; Thu, 3 Nov 2022 21:16:45 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id DC782160834 for <linux-mm@kvack.org>; Fri, 4 Nov 2022 01:16:44 +0000 (UTC) X-FDA: 80093995128.09.0A70A33 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf07.hostedemail.com (Postfix) with ESMTP id 5C93640003 for <linux-mm@kvack.org>; Fri, 4 Nov 2022 01:16:43 +0000 (UTC) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2A40T8tZ017515; Fri, 4 Nov 2022 01:16:41 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-2022-7-12; bh=afDnWx7KDSr+HSL4S8p4GAQRhSMVUXfqMhYDI8im7Bk=; b=Rz7U2RL0TS7JXynFcNYvcXMZNmnmQVwQroyoOH6WtzPXAZQzy7RUuhaQtVoWY6ZsSal4 fBnfFMWuvJY9Gq0j3SDJBCeeWSYpjfqPNl/lk7VBdnS2gw+9MYEBAMqjsuRMyd4xd/qT e1l21JlF+6SUi7mBJx+z9yK2Ta8oF8m/EEEQ9+36CDEzXXo0psFFuUb5ecMXSYVkBPOZ 5DRgADzMfTtLkwhjnMJgAb4KlJBJ6TRzuEkkmwYeXvUyHWkCY0OOPG/o1xxz14dwugrx VgNz12j7S8hAr9SvkYcLu4Ng1xA4MB7DEhgUS2nHLaSMCavNvtkqiYLVM/W+Jx/ekmyr qA== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3kgvqtpsxa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 04 Nov 2022 01:16:41 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2A3NL3O1032943; Fri, 4 Nov 2022 01:16:39 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2102.outbound.protection.outlook.com [104.47.58.102]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3kmq85hwsm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 04 Nov 2022 01:16:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DBSnp+lMbzySjSwMJj5FL/ozOYjnTA0kltrIw9a8THXC0+Gh0mdgKoxVeelV6eM2A6sxToOdcxiiLc0r9Boeg6G5R+RQ8yL6TptY/j0AQE/Rc/mxBTYMdQqhUhvNFePLy7nDMkOUFjAse2OrkfrpVI5v5BiOHAHSGQOVNR9KKEwp4DSr9iSASgwhv5lQL398KBc+j8UO8+hOSTIcsGdyg4i+K4Tqdum1lT/uUnmmKN1fXNdPkLft+O/Wyv8VTI1TF6q/4LpHInbdBOin8jjG7EQoy7ENbs6GZHSPdPYMgO/x/hfKlo/zI+n8k3Q8rpT3kQ6G6vlLkJZVwxIn9I8lFg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=afDnWx7KDSr+HSL4S8p4GAQRhSMVUXfqMhYDI8im7Bk=; b=F1agSBKeDtQ+8j644BER6KrRp5PgrE/KEeLIKqBuZmq+v5zoSuAT4WVU8y4nuURc/kQq9OUDd6k8JB6seuwTrlb7orZ0RFrL3qqWViQ8HsfS44AB+qRaQFXIE+fU5fQOgbCIdpziSJmgLl60zgPAawBRr1GNUq66eWMFK7YKQmCXJY9X3Y7TXISlvKwUUyhSr+PAsVSBMymLV0H+f76MBdm74Ck1cV2s9rJe+TQqMWke0lRm6Z2mzL1tWyc7voIscpnSE3qw2W+YIgh5LXEm5QR+tKJGP+fU6sIX+0AGrQ7eVph5ndnKrZ7dz/dSzTIMD2KjHi/mSoSAcUOUiJST2A== 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=afDnWx7KDSr+HSL4S8p4GAQRhSMVUXfqMhYDI8im7Bk=; b=K+97/8exGKqyisYIeLWqwOdNX05zh8AWo9qcfmdDVNGt7dLAmpZbdiYIwiM2P6aWGvPXiMskr14bISNYJmAltBCqxTg4E+JDV1wcysVH7ZamsKqiqHtSMhV2DAwcVRByHSTATF+4sH+kie+yy+bpBHfh6/o2BGbf59vsk8ZUIfw= Received: from BY5PR10MB4196.namprd10.prod.outlook.com (2603:10b6:a03:20d::23) by CH2PR10MB4151.namprd10.prod.outlook.com (2603:10b6:610:aa::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.22; Fri, 4 Nov 2022 01:16:37 +0000 Received: from BY5PR10MB4196.namprd10.prod.outlook.com ([fe80::58e9:95ba:d31e:ddd3]) by BY5PR10MB4196.namprd10.prod.outlook.com ([fe80::58e9:95ba:d31e:ddd3%5]) with mapi id 15.20.5791.021; Fri, 4 Nov 2022 01:16:37 +0000 From: Mike Kravetz <mike.kravetz@oracle.com> To: linux-mm@kvack.org, linux-kernel@vger.kernel.org, oe-lkp@lists.linux.dev, lkp@intel.com Cc: Rik van Riel <riel@surriel.com>, David Hildenbrand <david@redhat.com>, Andrew Morton <akpm@linux-foundation.org>, Mike Kravetz <mike.kravetz@oracle.com>, kernel test robot <oliver.sang@intel.com> Subject: [PATCH] selftests/vm: update hugetlb madvise Date: Thu, 3 Nov 2022 18:16:32 -0700 Message-Id: <20221104011632.357049-1-mike.kravetz@oracle.com> X-Mailer: git-send-email 2.37.3 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MW4P220CA0006.NAMP220.PROD.OUTLOOK.COM (2603:10b6:303:115::11) To BY5PR10MB4196.namprd10.prod.outlook.com (2603:10b6:a03:20d::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB4196:EE_|CH2PR10MB4151:EE_ X-MS-Office365-Filtering-Correlation-Id: fcdfb4c9-1c1b-40cc-f456-08dabe023866 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uHJ3dpnS6tcw5tZiYnbrhVLmnqee8QyIjN0IKFqiP7Mn0gCvMMANwSjxyhXxoYTO4hO0bzGY1GiGIeKQsP1EKdOXx67dGb4XcinStHP5P/qEfcbqmZA3/KVPhQzJPFvKCzUx93Kp/BuksL2Z/uZT85dvSev3ZSa1omdjaV9Kr1iDx5WJq7jo2wzIlAWhvbltzjr0mUXZN1c5c7SM2773A5V2nLpiQ+hCh/nrW9MJFfiIKYD7RkXUj+pzsnz+KyGk/h+5PcoyFUBc1hJUYV3krj2jkr2YWl747XMJcCdtrvP6S/QWUCX5Im6J2cBqSTHemZeh+7VbZeQF2DGXkLscqZXFeCt46mTyO4wEp8bmD+dF9gkSBMLm5hdhyidfZ0aflLqgNw3uPAv+hVnA5lg9qD6X+aXq5T+VAu6sZ7rloJS7nOPvccdrwO0aADwSLhUTVug8wRgSLmPT3w8QAqtY09nsnTs9Yl5DRmgvXZB9jq69ZyYM2IlTRJMksZsWiauZZhubenpWsJ5/SlpopyC/tZHcu7xx2HuBL16qqx3oAqx4RjDV3a5Xir2JDOZduw3oRpHf7Z8d2YuGi41e7CXxAgo7nBTtuNvUVajhDAcTfjtSnnhWb9zpW/JD9ss3rYk0R3jylEc8I/Oh1zy0ElBlZJWuPwo2uv75iRtNTayGRs2dXB6VHMrlcUg61RhhdXCQ82nZhaIhhstM2qQ8risrUUS05M4ptA85g86fazXeFoM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR10MB4196.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(396003)(366004)(136003)(39860400002)(346002)(376002)(451199015)(2906002)(15650500001)(44832011)(36756003)(316002)(6486002)(966005)(66946007)(83380400001)(41300700001)(4326008)(54906003)(8676002)(66556008)(66476007)(5660300002)(8936002)(478600001)(6512007)(26005)(1076003)(186003)(2616005)(38100700002)(6666004)(6506007)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NKMCnK3WBf82+pLxXicH0ET2TJ/mN3TxGA+OncKjQQi6SyNXVF5Ii4QlD9j9wpNxaZmWWqUafdCzvNt7Hs/7zEplL7D5CPmUxxNovYxk/iqx4BHhAx7ZfVQooG571kprS9IFKmbyit6AKYHYvsOVBkItDn87ynENDxAv6oFcEJvcTMVGpiMO25GEZ/CbWjOLdGiVAuJ5G7qHhxnvV5w0C9g83J010MOUgoJOlOdGL0CwIKtG/MUKS8+a4CyFF4dj6/4jhTw4cwKuCLrBdVM+kdPnJe3yFACJcns3/9TOTJsYZgjvgzDz4NIYbvZkJukBXedjPTnI7w9gZB2oo/RW1Abnh2Mgn3iWa4pdnL2XhJwzF0ysx9StWGv+iP6Yz9aRwakGv5ABS0EdL62l577vc0QgFP3HSwIMOg3sgKbLrkLI8NhveAX6UuRSD2uLGNPEpgz9fV6WJtDa+DXWqDoigua2h4RNKYbjYONArYP/YckroFX+RLRETgLbOIlWQNWDyC3M2/Qgg3OixqBDh/qyJ2ZaZXZLa3jXri8GBwck9ErtrQs90dY33MQRbI6ogagvqkYg8P19eK3MwczoVsFuI5FElhgNIcnLPk849MSARS5+WUaJliUT/0A5DtXk5qQh0J+bNdlNbLt+UR7gl1eji6L+cqE9tAhN+RN246v9Q5BBA34zGFbR5bqWSnJBcRgSbGvb2qhlhXNZFNq29IThWY29G5LB6hKIH+LLsTSIL1NRLTMqoMcvj5i0lMoVcXJ+Yk3TR40I3mwbct2w/gnH1JxbtD2qtPyHWzzMSq5TYx1c6HL2/NP02soZwcLQgFVPqeGRJeC+rELSGwaejxcKjbDuNYtVwmmxQCGM1hU7y+YvFCx1sIbWXjwDszVYMoMRnp8VuK+CkXAXIwRuAWp40rrOGsan1FuQh3+U8EhIC6XltOLtCZ1PQIy8Qx2j1e/EIliHT+7sGlhGC4SNllkcpSCPRPav2OBNpAPwZiZASn4prti68xLQz+KN/iK6n7MYVS/KN7K0j9mUjCpxxOcv5wPLQ8rEB3FFNyqr/4fA1hqgeBAKKMgUthtwh2GEYMPAJ6oSXqYcSOXEKH0awweoiA8XSPArt37gOn/pN8d4pk1x8tSM9FhAq1uhbD5CRIKVYAbCQcsza+67F3L0jl6kUcfznet5ZUnd6AmmK8pS0C5xPSV1U0YsmFDMGxlQrzh6rB58SAVEa8TJYwmrkQbPjq+vSOY9lNgKam4QTSGRwLrvCOCb7EoHDLShNrcLvDD8+RUDTbMpscnYMMI2Krl7ZHeU5bsHBPunPoMD3yfarYJpxOc4DaphZ/gCrC1SpSqLWRPeAg+ZPo6rncFJNmXr+3t542H4v6TQDhJDIej1P+XEBNoIHh2hK94fsWxD0KVOdOIcMggY7Fkxbc/fkVUs4FgQWICkLs3AqBj0nBXaQZjAp7h1Jbb1n2BoyvR43djZw/DRAt3gqyfFOL/zYkfqUllIs+wKiab+F1TPup5V6ZVd8I1+DB2X7L+CeFNUCUc9SnbadjMMtfmPltS7VqurGTS572GjMoz4zDAsUVTjd1MWGep/jTGL3cn/cME8VCYt7jX7yCXZ6kQwy+jtKgX/fg== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: fcdfb4c9-1c1b-40cc-f456-08dabe023866 X-MS-Exchange-CrossTenant-AuthSource: BY5PR10MB4196.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2022 01:16:37.3704 (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: DglfjAGe6oB5TcFeeZv6S590/l+LdVwrkaDP0r1NV+lz/3jcea7pYmMlzY67bKl/wlWanbarcfq/bgF56YZlIA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR10MB4151 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-04_01,2022-11-03_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 bulkscore=0 suspectscore=0 spamscore=0 adultscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211040007 X-Proofpoint-GUID: u07FZF5WFJWHk4_BU4H2p86JmJ1W3c2K X-Proofpoint-ORIG-GUID: u07FZF5WFJWHk4_BU4H2p86JmJ1W3c2K ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1667524603; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=afDnWx7KDSr+HSL4S8p4GAQRhSMVUXfqMhYDI8im7Bk=; b=7VqsbTYIVlK48yCsO7REgkysSe/EIILbOS0RSuE/xFnZPw7IwzAHZD37uA9fVRPTA4xkXQ pFWI+XY7gI/5m63rtDBUItLNy2zGwhJAt8ePZ02d8pEW+DeAJQKAoBR6XlO81n069Dk+Eb PnM6JX6u/jQqmNitYxW5juYittNOdGQ= ARC-Authentication-Results: i=2; imf07.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2022-7-12 header.b=Rz7U2RL0; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="K+97/8ex"; spf=pass (imf07.hostedemail.com: domain of mike.kravetz@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=mike.kravetz@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1667524603; a=rsa-sha256; cv=pass; b=In2fUqULDBNcQeGUbcz7v7hgsTMXwuQhdvuKkUKLqZKiXO7T2gBLWkKQE97Ie1WppVmIPG 9ON3RwvR/HLoBI/VdoJ52ECPStgIq3Epv0Tar8UnsMVhuEy5SEWDqVpA4sYIfDExpi41j6 zA3f1zPAzkct/V6Hw8Jm/QTQTEqA/gI= Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2022-7-12 header.b=Rz7U2RL0; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="K+97/8ex"; spf=pass (imf07.hostedemail.com: domain of mike.kravetz@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=mike.kravetz@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=oracle.com X-Stat-Signature: rm8k7yutz56s791h4f6p4fmf1iyucz5x X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 5C93640003 X-HE-Tag: 1667524603-602183 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: <linux-mm.kvack.org> |
Series |
selftests/vm: update hugetlb madvise
|
expand
|
diff --git a/tools/testing/selftests/vm/hugetlb-madvise.c b/tools/testing/selftests/vm/hugetlb-madvise.c index f96435b70986..a634f47d1e56 100644 --- a/tools/testing/selftests/vm/hugetlb-madvise.c +++ b/tools/testing/selftests/vm/hugetlb-madvise.c @@ -195,7 +195,7 @@ int main(int argc, char **argv) exit(1); } - /* addr + length should be aligned up to huge page size */ + /* addr + length should be aligned down to huge page size */ if (madvise(addr, ((NR_HUGE_PAGES - 1) * huge_page_size) + base_page_size, MADV_DONTNEED)) { @@ -203,10 +203,11 @@ int main(int argc, char **argv) exit(1); } - /* should free all pages in mapping */ - validate_free_pages(free_hugepages); + /* should free all but last page in mapping */ + validate_free_pages(free_hugepages - 1); (void)munmap(addr, NR_HUGE_PAGES * huge_page_size); + validate_free_pages(free_hugepages); /* * Test MADV_DONTNEED on anonymous private mapping
Commit 8ebe0a5eaaeb ("mm,madvise,hugetlb: fix unexpected data loss with MADV_DONTNEED on hugetlbfs") changed how the passed length was interpreted for hugetlb mappings. It was changed from align up to align down. The hugetlb-madvise test explicitly tests this behavior. Change test to expect new behavior. Reported-by: kernel test robot <oliver.sang@intel.com> Link: https://lore.kernel.org/oe-lkp/202211040619.2ec447d7-oliver.sang@intel.com Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com> --- tools/testing/selftests/vm/hugetlb-madvise.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)