Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1660087ioo; Sun, 22 May 2022 23:23:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZTtPjpLC9heTU75s6JE5kOb1k1aE43EuN2oJLyI/yvq/b8LNuPzJN7TjrrkePRS432gni X-Received: by 2002:a17:90b:380b:b0:1e0:3c34:af83 with SMTP id mq11-20020a17090b380b00b001e03c34af83mr6547027pjb.236.1653287020047; Sun, 22 May 2022 23:23:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1653287020; cv=pass; d=google.com; s=arc-20160816; b=ygHTq8Pe+znysWMcNL0oR+KuLWcZyoORXxZ6vQKvf82gpWs023ccdeaHuiUxrmCgSR AeIf7WDaJH6jmb22gl3/Wa5wdivR/o7Hc1xDkxsdUfJrDuYb9/GuW8UI0H0Y8Y5+B6V3 /LX2gnDSMgi+z1Ee/Wcv16H4ivAoX7lHQskGsz1P2PHStmQ5LcRfNCdYjsV4QDGllVeO Ze0J/wgH7+KjVq2GwNE0N0PbyWeY8m9gS80drgWvKvx7QWwZ+DnoAbz2GiicvHbBtdpO /lxYmfBFmTyTMCad80gFwsWCaVcxtGwqEgoC+VnVZnucrlRWrQq90CVWhiVvbrYc/fy5 qzfA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=nYvZ4xzEpbSd0S3BmUsY+klbyHoTNTtS58yHHv5vEAg=; b=zXIpqIZ1q73CJ/oVliAvuWT9CSu9PTZHQsH9YiykLcKZurwz+lkJceCh4WvZWkkH5R L8wWpNMo7vLqd4ragfIYCZTfN3Fsc67ph/UpJRYw9S9X/E5fOw+bjqF6y60umd+sfaWs EICM3ytNldU0zTHCYcXTYvJIZ5BLUmrwDvQt1fr0GZI03ogrJrgmnrtjvDdZbFLG9v9H M/AVr8u+mijWxCiisJ1D4r0Juk+2zUrfyNKR66xhdgF7hRrAbCTvxwkpXPCaHafcKQ/K /QwIn0B6rDlyF0zFp50ZITuQwhpVM76oa9HgYEhiMuw3402Vpip1UGqnHAnUxq/NRzUT MuoA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=yZohmY5b; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=glCtycCj; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u15-20020a170902e80f00b0015a30ec2f9bsi10166203plg.55.2022.05.22.23.23.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 May 2022 23:23:40 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=yZohmY5b; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=glCtycCj; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7A20F2AC4C; Sun, 22 May 2022 23:05:42 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347564AbiEUXvz (ORCPT + 99 others); Sat, 21 May 2022 19:51:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345028AbiEUXvx (ORCPT ); Sat, 21 May 2022 19:51:53 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A00303B2BE for ; Sat, 21 May 2022 16:51:52 -0700 (PDT) Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24LFqjLN006977; Sat, 21 May 2022 23:50:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=nYvZ4xzEpbSd0S3BmUsY+klbyHoTNTtS58yHHv5vEAg=; b=yZohmY5bAzFQvZHh1t8imq2p52dJY+laaqE8mFMNnGaWDblL4qwEiIxkbkQ3Kwe8Gz3j asykpQ71g33TsWbF/MQg1L2q5bT8HA4OIAEnpqNrmHE6C0IJjmCfOb3+aY6wjxPg6oO+ bDdWiClcu97CPzLBebEMtVEPJktaHlEWBSQZf5fQ8UehTbG30nHF9+QMv6bU9Hke+Rh8 pb0X6Gw86wCekq7k0C//73oEzjGrOgd+QBmmhO6BfG9YabU7l2OdQGQmEAoz3yctleBN PJH48EWnFM6FkgDfYaROHfVDP9a933dkrcFTsExEp7Y/9FPKJvLGMeHiRFAX4ZSZHCrR Vw== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3g6qps0vrg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 21 May 2022 23:50:56 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 24LNk2wq018293; Sat, 21 May 2022 23:50:56 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2170.outbound.protection.outlook.com [104.47.55.170]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3g6ph6sxmy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 21 May 2022 23:50:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hOuk07ox6aRT347mwlA6RwZURGagZN0x7ybsRwIFoW/z25ldM+BERG9JxTz6EhONNNw4ISjRSO2GD8jOYP70fJrXzvamYxyfZUgqVGp4hKXxaZF4ycVOqfNMCQi6eVr52AcqdAuAQ2L8v2qtfIHofnMdOqoLJcUPatGOMplyBAwCszPM8reYuICXUHbYPRoY6XZZn7giotpBS5kJkMrBX5f6AIk2L87zUZ6TotBnIwoeTAAxhTgWTBhvxj2qFERnw0imojraKF1hLjKDAGlCO0nBs0YQh4BK3ba+KhCOR7ku9etxzJy3M8iZ1tD8qG8L1UFzbmrkEgKcTtPNm+EflQ== 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=nYvZ4xzEpbSd0S3BmUsY+klbyHoTNTtS58yHHv5vEAg=; b=mCJMZ2Mbge0KH28Vnm0JutsHbcdrVK+w7QznBqYUAL3bOLECfvZ6cj+Q2aJAKo//0rA3gNHyPLyEe+hwhx2zUu5Gmx+w0TG92qm21hnEOek7krOWBqRMkTq/rqPLNlT/exHOuZ5qbFG173sSsKmGJqGd67G2JWu7Fh9XRQ/7cmCpELiTVVai0JAlzB0wiZO+OP3QKUNz5byQNYkaE3KOP1mwVtQi4+dGcB0DaAgCzKGOF9LXaFoD0uEVIJ2Xl4zw35Sv6PmboC9jEylVt+HXfM+yTFT6XiUzsKYCyNPe/EV4wLpCxQD6bNlEi5q70jggYDnvQLti/9Yab2JgIyp8UA== 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=nYvZ4xzEpbSd0S3BmUsY+klbyHoTNTtS58yHHv5vEAg=; b=glCtycCjNEffcoskClfWe9+7hpeFdbKqdVlhf1OgkdDAehkgHw88W4zRO0/4oX467TjoP3wOVt2R94TtyXfVfeatDb+2sa0+/jtlExVbw/zMpFWNHRiA06C7cumPjUv6dzQBw2vSqdzg/uKxy2Uc/24r3utOnEukBWEbEAQGyvs= Received: from DM6PR10MB4201.namprd10.prod.outlook.com (2603:10b6:5:216::10) by MWHPR1001MB2208.namprd10.prod.outlook.com (2603:10b6:301:2c::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.20; Sat, 21 May 2022 23:50:54 +0000 Received: from DM6PR10MB4201.namprd10.prod.outlook.com ([fe80::e81e:38af:cb6e:59e5]) by DM6PR10MB4201.namprd10.prod.outlook.com ([fe80::e81e:38af:cb6e:59e5%4]) with mapi id 15.20.5273.022; Sat, 21 May 2022 23:50:54 +0000 Message-ID: <6daa971b-03f1-0f69-4c85-ae4796d339e0@oracle.com> Date: Sat, 21 May 2022 16:50:50 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [syzbot] WARNING in follow_hugetlb_page Content-Language: en-US To: Minchan Kim , David Hildenbrand Cc: John Hubbard , Andrew Morton , syzbot , linux-kernel@vger.kernel.org, linux-mm@kvack.org, llvm@lists.linux.dev, nathan@kernel.org, ndesaulniers@google.com, syzkaller-bugs@googlegroups.com, trix@redhat.com, Matthew Wilcox , Stephen Rothwell References: <6d281052-485c-5e17-4f1c-ef5689831450@oracle.com> <0be9132d-a928-9ebe-a9cf-6d140b907d59@nvidia.com> <000a117a-694d-d3a9-a192-14d08d50c884@redhat.com> From: Mike Kravetz In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MW4PR04CA0283.namprd04.prod.outlook.com (2603:10b6:303:89::18) To DM6PR10MB4201.namprd10.prod.outlook.com (2603:10b6:5:216::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f053d187-985b-49b3-2ff2-08da3b84be2b X-MS-TrafficTypeDiagnostic: MWHPR1001MB2208:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kXVjXp4fxp+yVyOenc2i6rlC/hWocMulDdD2uT3bqADttF3dUIgEcGr0mh7+lxMoxjyzH01hcTr3kLS4A85k/91OLeLh2YN0IsivYMjl7STXS/VLkMIdroZo1qtEUwO3dYVqcNAz58o2vDMezlFUy5cZqXwulYqQ+ElQNjiaC+VZ+p2PIJAvxt18JsNq0DpM488nwAqgrSK7ee8PK7QHZDrGW6h7jXZ0L+YRk3plh2wAEphR3dcp4z5h57SxicE9eWutJNsOZgCr8IjT6aifT7gIruNHvtcUgDYhcRSFMynwi8ZoclOpmbV8Ooyr6DUJNxFvFbQeNXMGPcOKBFltX8JRvLWLQGfiV02gaIHfMgWz6hC8143ee06U++5LmUfUwywf5EA4gtxNdprC+fEupbwL5Q2GXh15iAe8th4cU8c/spxC5RMLmv0PgwDFp71ajyLRprFRBDCuqIozq2ejztgbLIn6ciplVTWTW6NJGzjBcGf+ij9salifjVlzmZKySs2sG285Qk/OMX9dvTAOD3JnhitUK2oW5YCVHdW6qLP2hOHRV1wmmoEfousXayYbL0YLsQ54OIzvoje7FeSb5iw9qX/HcD5Id5ej01FH7t+HRn/rnT8bExkJd4wTQYv8XsAMe+Qj8UTdtyBNi1Z1dV9n8yWQLNmL30xKMLzNAgeuuElDVX/hrQWDaApH+Ge8uc+gM+Q5Tb8fa0uE4MtmzOjhRgNGKfgOzEcKO7VCY40LI3+xw862qKerLp+vjWqxQx3V5CYrQi1/rOrYwCDdeg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR10MB4201.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(186003)(2616005)(38100700002)(38350700002)(26005)(2906002)(31686004)(66476007)(66556008)(66946007)(5660300002)(7416002)(8936002)(44832011)(52116002)(6666004)(6506007)(53546011)(6512007)(316002)(54906003)(4326008)(6486002)(8676002)(508600001)(110136005)(36756003)(86362001)(31696002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VHA1VHEwcytUa1AzV2RYNXRiMndBOGpHMjV4WUl6R0M4ckhESHpZR1R3MG0z?= =?utf-8?B?bEFPbUxOemFackE2aGVveEsvSkxBbDBETGk5VVMxL2tveVpTbllJVktkSzR1?= =?utf-8?B?eERYS0daTmozRVJEUzcvYUZUY0F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I1Z3J5bzVTNitPSFBzaHEzR1pVTHR6SDZwM2RBbkd6Znpv?= =?utf-8?B?OXlYK3JRVW04c3Jpbm5kTXBPeHhaWXB0WVBVSzBvRnVrcDhYdHZrYndFY2sv?= =?utf-8?B?WUx6bE5iWkdKaGcvaWV2NUYwMVRqY3JsSlBkbnhmQW1sTkZTNHBJV0hISXgy?= =?utf-8?B?YlJzSjRLcGpFUXBqa2I4bEdnVnNDeWNrQ2FZOTh6OE9pSVBta3VxMzNxb041?= =?utf-8?B?MWQ1bEQzd21lZ3J3OFQreDNxSGhGTW1pWS9BVGI3ZjVtM3hnZFJralFCMDBx?= =?utf-8?B?UHlVaWNSVUNZenF2blc5Vm40bEVpczJEbjB5bmNwRFhDK0FEOE5veTZGZnFX?= =?utf-8?B?YVZLbW5MWWFpNHNGU0VWV2lRY29VTkJkN1VUL2pFcisrQUNweXBoN1RPcDQ1?= =?utf-8?Q?JcWTgi9dNGmfDN3o=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: f053d187-985b-49b3-2ff2-08da3b84be2b X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4201.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2022 23:50:53.9663 (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: PNa7LAZOlunSdEDPYt3Sa42tz7zXia8mtFdUQnPuqb+8ajuJF69ELgfJKnsIjgXswhvQdWdXXJQLYpZMAC3eLg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1001MB2208 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.486,18.0.874 definitions=2022-05-21_08:2022-05-20,2022-05-21 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxscore=0 mlxlogscore=681 adultscore=0 bulkscore=0 malwarescore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205210153 X-Proofpoint-ORIG-GUID: _M5kgwF6t7nHTXIri1xGg-SFnRfh-C1j X-Proofpoint-GUID: _M5kgwF6t7nHTXIri1xGg-SFnRfh-C1j X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/21/22 11:25, Minchan Kim wrote: > On Sat, May 21, 2022 at 06:46:27PM +0200, David Hildenbrand wrote: > > < snip > > >>>> The general rules are: >>>> >>>> ZONE_MOVABLE: nobody is allowed to place unmovable allocations there; it >>>> could prevent memory offlining/unplug. >>>> >>>> CMA: nobody *but the designated owner* is allowed to place unmovable >>>> memory there; it could prevent the actual owner to allocate contiguous >>>> memory. >>> >>> I am confused what's the meaning of designated owner and actuall owner >>> in your context. >> >> designated==actual here. I just wanted to distinguish from someone >> current temporary owner of the page ("allocated it via a movable >> allocation") but the actual designated owner (e.g., hugetlb CMA) >> >> The page/memory owner terminology is just confusing. Let's rephrase to: >> only the CMA area owner is allowed to place unmovable allocations there. > > Yeah, the CMA area owner is much better. > >> >>> >>> What I thought about the issue based on you explanation: >>> >>> HugeTLB allocates its page by two types of allocation >>> >>> 1. alloc_pages(GFP_MOVABLE) >>> >>> It could allocate the hugetlb page from CMA area but longterm pin >>> should migrate them out of cma before the pinning so allowing >>> the pinning on the page is no problem and current code works like >>> that. >>> >>> check_and_migrate_movable_pages >>> >> >> Yes. >> >>> 2. cma_alloc >>> >>> The cma_alloc is used only for *gigantic page* and the hugetlbfs >>> is the very owner of the page. IOW, if the hugetlbfs was succeeded >>> to allocate the gigantic page by cma_alloc, there is no other >>> owner to be able to claim the page any longer so it's fine to >>> allow longterm pinning againt the gingantic page but current. >>> However, current code doesn't work like that due to >>> is_pinnable_page. IOW, hugetlbfs need a way to distinguish >>> whether the page owner is hugetlbfs or not. >>> >>> Are we on same page? >> >> Yes, exactly. What I wanted to express is: for huge pages we have to >> make a smarter decision because there are cases where we want to >> migrate, and cases where we don't want to migrate. > > Sure, maybe hugetlbfs could squeeze a bit in one of subpage of the > CMA compound page. "I am CMA allocated but allow to pinned for longterm" > Thanks for all the ideas here. Yes, we already have a whole word for hugetlb specific page flags (see hugetlb_page_flags in linux/hugetlb.h). I'm pretty sure I even proposed a 'allocated from CMA' flag, but there was another way to get that information. We can add such a flag to for the purpose if making a decision about long term pinning. BTW - It is possible that a gigantic page allocated in CMA could be demoted (split) into smaller hugetlb pages. I 'think' we would also want to allow long term pinning in this case. -- Mike Kravetz