From patchwork Tue Nov 7 23:08:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13449440 Return-Path: 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 2370DC4332F for ; Tue, 7 Nov 2023 23:09:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 46BD54401A8; Tue, 7 Nov 2023 18:09:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3F018440186; Tue, 7 Nov 2023 18:09:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1800C4401A8; Tue, 7 Nov 2023 18:09:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id ED7D5440186 for ; Tue, 7 Nov 2023 18:09:48 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id C0D8A160B63 for ; Tue, 7 Nov 2023 23:09:48 +0000 (UTC) X-FDA: 81432702456.25.6076E15 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf29.hostedemail.com (Postfix) with ESMTP id 4F2B2120011 for ; Tue, 7 Nov 2023 23:09:45 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=u7MBgR4U; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=I56sJIul; spf=pass (imf29.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699398585; 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:in-reply-to:references:references:dkim-signature; bh=CxtR35WfEHfVrunGElDiTM8LjPhoy1plhpoBCXyRgZk=; b=Fu4vRmpeAbKXOqy65IBqQU+tAihFbqXA/UDAK2KmhFOFg2f2MyrNxmQhK3FKwEpCQmZTRT zUeHWKzwooIQYihShhF87UQg7Do1JuuB+5rWookX769qGI28Zn73dfKeE9uMBjfWhD/vWk mu/XRbzv8z/H8BUpkdb/mleuGpiR4Gg= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1699398585; a=rsa-sha256; cv=pass; b=ywKaUgpUUhCkjpgAWvxh2jzlyHf2KwdKMpaquGZGDRkaub5YrcMpgE931yoZthA0LQ0y66 zqjXt8dgYdNPAbapU8lO9vpq+kpx7p6qD0hqwd4fVNS8gqTWPyt0j0/lRkzc7bLME+GKf7 LE5LAo6qP0JYfGV5fW7uV3iAwJTyykY= ARC-Authentication-Results: i=2; imf29.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=u7MBgR4U; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=I56sJIul; spf=pass (imf29.hostedemail.com: domain of ankur.a.arora@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=ankur.a.arora@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7LJjWV020343; Tue, 7 Nov 2023 23:09:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=CxtR35WfEHfVrunGElDiTM8LjPhoy1plhpoBCXyRgZk=; b=u7MBgR4UQvF+/g6JUw6+6ToTDQO9e//6BZrr5klVjb3xiszIhD02E9V/U/OkrilQo3Nm WZzm0PJVjuJ/GVadytw5IH/DN1DntY8/B8dkFwZSwMfsSburwcI8erQTKR+pbBIIhvsx N4D5bwtucQFureuONcP5L8mx3jtQF/R/t8+c22ZIB8bPAaJ3N7nLzkXx3eb2f+GQHH/K rO+mO/uwcl4WzkkUmh3RWRAtqiwydNGG1bkaSQMCPUtEaYRjkARSTTpCeBnB1k9bfRMe FowVHss+WK++nUPGNzvyFPGVzDakOnslIPoQ93+TcIvnH4TC69LNK220tAbCtogH5myl mQ== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u7w22079r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:18 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 3A7N2f9w000483; Tue, 7 Nov 2023 23:09:17 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2040.outbound.protection.outlook.com [104.47.66.40]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3u7w1vcbqc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 07 Nov 2023 23:09:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=laL5aznsEvVmy8FlMXRx5wgpxaxzxQL5mtiLT/FmZ3aP+u5Gt74uQhu0HUlFsSW5Qd0S/VzToDOsFlgMThF+aHqoxOeLmCWCVSO7O8OEj5zeiUq5l3QTRvTt+22AmvrSEc9TJ0P4nu74yfMXz+tOYmcQj+Ye1m20zNiCPMhKssz/9GmeecWLrIjY6mVW8mqcTpHt46YW/Y9y5HBrYhLE3vCytWQUk8Ep8jjf0KDe79H/p47vJWRqsy2zdLplW8OcGmogVF0Rmi6r6jKVUedezeRlnWgeSrfHu1El0avMISIytECF8DJHPE7Yh6QZ63h072V5pNJ9RQNeTCda0dSk5g== 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=CxtR35WfEHfVrunGElDiTM8LjPhoy1plhpoBCXyRgZk=; b=RxVvDoPLLcxQSdYYYi5NMH1uYSsz6uuEfXQ/hGz314bEMHbfI2b9NnP3QYChvG6An2Rh+1mch5gGKH14KnhPKA6q0RrlTVKeXGeLlveiK1jEJbGdPOA45DwvVtshgfVh6xJEkdF0B6ULs4QNgvP+3922XfY+wyapPXReEKoOvKWGChUiXld3k1J0XJLMbD+RdZIJhLr5a97ZzQWp6FVh2Unvd7nZUvH3fNJ/A3vUImqTESZtCtl6HEQpk+WMaQDRBY3hmueTD90Ek58p+TtCsbKN8ybSUtoi8fcIRf9H92o08X3vovC13r+jWQelXXmmrTET9ZwfT/iV48WBo3o9vQ== 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=CxtR35WfEHfVrunGElDiTM8LjPhoy1plhpoBCXyRgZk=; b=I56sJIulWLv3+R2HYBWCDMUoZAqJui/toFecbpvoZwixWQe42LpmRENxuo8hpg1gJrt8rJI3FouwL2DNsarICnG5j07m1aLzU+/V1MOF1Y0yf9+uyLywOgbKnzTAb1Y4b2xjGHyDihL7pIMsPhW5UAXdcQK2vyafvlNPKeTcI/E= Received: from DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) by IA1PR10MB7261.namprd10.prod.outlook.com (2603:10b6:208:3f6::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.28; Tue, 7 Nov 2023 23:09:09 +0000 Received: from DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b]) by DM8PR10MB5416.namprd10.prod.outlook.com ([fe80::c72:c098:4fc2:629b%4]) with mapi id 15.20.6954.028; Tue, 7 Nov 2023 23:09:09 +0000 From: Ankur Arora To: linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org, paulmck@kernel.org, linux-mm@kvack.org, x86@kernel.org, akpm@linux-foundation.org, luto@kernel.org, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, willy@infradead.org, mgorman@suse.de, jon.grimm@amd.com, bharata@amd.com, raghavendra.kt@amd.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, jgross@suse.com, andrew.cooper3@citrix.com, mingo@kernel.org, bristot@kernel.org, mathieu.desnoyers@efficios.com, geert@linux-m68k.org, glaubitz@physik.fu-berlin.de, anton.ivanov@cambridgegreys.com, mattst88@gmail.com, krypton@ulrich-teichert.org, rostedt@goodmis.org, David.Laight@ACULAB.COM, richard@nod.at, mjguzik@gmail.com, Ankur Arora , Herbert Xu , "David S. Miller" , Kees Cook , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Thomas Graf Subject: [RFC PATCH 71/86] treewide: lib: remove cond_resched() Date: Tue, 7 Nov 2023 15:08:07 -0800 Message-Id: <20231107230822.371443-15-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20231107230822.371443-1-ankur.a.arora@oracle.com> References: <20231107215742.363031-1-ankur.a.arora@oracle.com> <20231107230822.371443-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: BYAPR07CA0072.namprd07.prod.outlook.com (2603:10b6:a03:60::49) To DM8PR10MB5416.namprd10.prod.outlook.com (2603:10b6:8:3f::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM8PR10MB5416:EE_|IA1PR10MB7261:EE_ X-MS-Office365-Filtering-Correlation-Id: 06eef8ff-3c42-4f22-f839-08dbdfe68c22 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5b6ndjvFNZ12a8FLLiTuTTeurMj+7agXLbCv9NZqrnpHP2apYak3ha+J1ktgxkUKUdFM8E0AO7lqU1XWemk8obU68G0aPtddrHXffrCfA3C8OP1LVtRrD4RDoOIvyXxfWIioOkYFAKMZf/llg1J6vweSlsKwtgShVYMzPgw0bSBLMNmBZhKzwjy4FNuHcw2SYhaOdGZe/ZEMMzJwQpf9IGAeYwnfRi2j0fPN2PlnXucuJ3upYcgK5nTYp6ZB7fNoKKU8vUe8EQIwdhSWKMfSHnDincEdlchqlYUT7rtUlWvd28a3aCU1Kh5qOGa7H7CZq4EqkcXBg3KbCMUdp3RcAbif2Pp1l7rZx4Rymehmj8sP1Z0TUV1QcGGawewMkcl2Bbxr9nGsBIf1Oqy5jAHw98amj1ThNmyG4et6ZMwfGeZKLA1aDcHcEBGwt2u3vOZlyTvUb+VkF64LhYldtWz0mD8DBxuF1vYNjmg6c+esQ2QRjMDzyYkD5Z8/F4BQ36GV6m23GWyMIytBG36i+963aPPjB9QjkiPAcS9K9v8U+bozXD2NgEJhzzVJhbl2oqM6QPN1P3gSrA9la6R3tI9ZQaIpthBH4fkPeTIUrDGtg93dH9oms4xTE3CK5BgF2KhS X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM8PR10MB5416.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(346002)(376002)(136003)(396003)(366004)(230273577357003)(230922051799003)(230173577357003)(451199024)(64100799003)(186009)(1800799009)(66899024)(6506007)(478600001)(6512007)(2616005)(6486002)(966005)(7406005)(36756003)(103116003)(38100700002)(86362001)(1076003)(41300700001)(7416002)(5660300002)(316002)(66556008)(66476007)(83380400001)(2906002)(54906003)(26005)(66946007)(6916009)(8676002)(4326008)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UbVIk3FFL8hR3V+fDBbKSeAWt+vl7deyfLAdKIcHrZ7A6k3H9dV+A/Tfjyg6KPQgW6/boe0qUNRvsoh6K36GOF5s5Vq8fmhNsJKx5WN4WIHm/xBOu5RpfpCu9oMwiDPp6pG6npEWFH9Xlzn0SaR5D6A2r2wjLbaCmADypTaXK6RXNSDrC4G3iMkhbEaKKnKPXIwkVpN5GK0nbLyJy6KQMNnaxPKD+onX/ctSOpWQ9u8V4QSVrJOap5pZhdS9jl8eam5xo22U16qZ0My8GYNXreQkvFHgV7bv6mCZPtyg0hyxaUR2VBSVCzbGQL7gsZwfCG8dp7QifM40s99NSPZMBi0xqJ4UY1NQO8U+WHukOBmqottnPtEDAeW1fzo3jKN/OZzITrq55ztR8qpkTiKCzw5QXGPSesdMGvuowumAI3BuZR0kvCgeAGrmJIRizO8qocUje4sjCYFKpQx5/XzlZ9V01/U3I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18o8yO0dwtMVzjV+XMtKHYKf4XaniM6U5sl6DGN65Fk2nwvvSl4sbpgxwGdqXF68KFWllMlDjFMUFFbIXi3822zg7Dr0Lg63q9GrR/Yg55qydgG/KVO+QJmlXT6NabRZz36d38vrlTeVkFcZzxV0ctI3VW3rrr74L2tmnh6r+sgGJ7KznPnHG+0j3SwUhRaON5SkjVjB5d2YFTG7IfRQfu4yy0rUfXdXd4CWXrmlZ4TqlCzpcDSuiOh32dilLhSI1f7Cym27LbOibKiH8WeL7U8+yZc3daYNIHdp1zFNPaVIft6c6j7WmdsJTHRiaAEHrUuQlPflnnzsc/ZOazf0iEM55l15D9w1oegoyqbs5UIxU6AnJY/OW2jcpORDnLiruaLvueP8dnYh6L8xbEKJ6qt8XeC6HUnDpJOmqJNMikY/p/Iqw5Rv+9BD/T7zg7G2sxRqlHO65vVhOwLazc1K0aPbGpwEbayXlmRxLzJE3QTf/JBzMZl6p1DXzAeDuBPoksexWw1K8q/pMFeaSjfp2nIcJ48tLzFjBzt6XbsSrYJDzLun/EzipOsWRUm5M33qPGx22fcOqWU6QM2ekCXQiPcMvGmnZdSdVFJ34RRb2jjDb0vUK90eYfEIURII2NFRD1orq6aD2OrhhD7JaY5bZAvzj4VDkvjbTZMCrtgD98gYFRIWrnb+Dy5FG/sTAguU2Woqhgfs8yjBbYSzW7yOXHWD/5dqxLohh13+bN4nsOYeId1mFElzAHIZw6rNPl07qdK1L81wvQd0zwgcsEKw9QWj6w X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 06eef8ff-3c42-4f22-f839-08dbdfe68c22 X-MS-Exchange-CrossTenant-AuthSource: DM8PR10MB5416.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2023 23:09:09.1725 (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: qA10gzwCS5oTLgPqxHZ97iB4/H5sWmiHZdXJmUkE8W9xFzDE1rwssg248Fp14mEVlaxlnaf8jBhKpUXT1Nm34Huvzk7kBoNW94fpyX8/hMM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB7261 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-07_13,2023-11-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 suspectscore=0 adultscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311070189 X-Proofpoint-GUID: RzcFPeLiSUCbGfj62VwIpN318D3a2pCv X-Proofpoint-ORIG-GUID: RzcFPeLiSUCbGfj62VwIpN318D3a2pCv X-Rspamd-Queue-Id: 4F2B2120011 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: kpdh4d9ohqgg86ooiamp6xdpa9fbthzf X-HE-Tag: 1699398585-948084 X-HE-Meta: U2FsdGVkX1/66xhV9GQ3FX7PDkcGfkh6pp/nTYxMv++j/IoePWfnBHVZDK6RxDGDSKcwBEVJPl/ijRMjzjJ9dBvbI1srIbKN+/VmNZKoCEznaByAsE+EGGRo9J89qijuf116uOIjiCK5UD1HQy5HC7uELyR5uKQoVZD4gPmsQfDCfitIEYGGR49ls6RK6Ezn6leSV4sYeDxvqti5GZXj01iekM33znEXsv+k10Lzi2mJpXhMwuNup1qX3VzL10nP5oLiGXgCH2dfUzWMOiR4S+AwajUikxe4rs0kxPAZuffTbKaJzQ4vakjvhEXJSANjX/9o9Lisoo4Rb3us5FKR6ivOSc5eIrzAUqUSV+FlDPTRr7W1oAr25kqKVXz1LE8wpg2PpivxSMWLg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0PWWSPDC3P8Z0IovayrewU4wBpEWkDM7wXjbNL9i5a5V2k2v42lEYOnNGbCYaLHUz9jvZPVdEi1bJApJgbfHoDm+wFhcac5hRO6cZZtdt16dkmli59ShaFYkQCv7JTTbSm4//MKfPKqWBB0+xLflznbZDbaXfQQ2U0eMhVR4fLGVfsLLfQMP5Xs3sJyn5PkCmtUrRN8tOYLLd5jWXK68ByyAZ/tYCanlMKWvX+pN99kJJVNVy7f7Bg3ia2OU15c4MCv7fXoJYQ== 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: List-Subscribe: List-Unsubscribe: There are broadly three sets of uses of cond_resched(): 1. Calls to cond_resched() out of the goodness of our heart, otherwise known as avoiding lockup splats. 2. Open coded variants of cond_resched_lock() which call cond_resched(). 3. Retry or error handling loops, where cond_resched() is used as a quick alternative to spinning in a tight-loop. When running under a full preemption model, the cond_resched() reduces to a NOP (not even a barrier) so removing it obviously cannot matter. But considering only voluntary preemption models (for say code that has been mostly tested under those), for set-1 and set-2 the scheduler can now preempt kernel tasks running beyond their time quanta anywhere they are preemptible() [1]. Which removes any need for these explicitly placed scheduling points. The cond_resched() calls in set-3 are a little more difficult. To start with, given it's NOP character under full preemption, it never actually saved us from a tight loop. With voluntary preemption, it's not a NOP, but it might as well be -- for most workloads the scheduler does not have an interminable supply of runnable tasks on the runqueue. So, cond_resched() is useful to not get softlockup splats, but not terribly good for error handling. Ideally, these should be replaced with some kind of timed or event wait. For now we use cond_resched_stall(), which tries to schedule if possible, and executes a cpu_relax() if not. Almost all the cond_resched() calls are from set-1. Remove them. [1] https://lore.kernel.org/lkml/20231107215742.363031-1-ankur.a.arora@oracle.com/ Cc: Herbert Xu Cc: "David S. Miller" Cc: Kees Cook Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Thomas Graf Signed-off-by: Ankur Arora Acked-by: Kees Cook # for lib/memcpy_kunit.c --- lib/crc32test.c | 2 -- lib/crypto/mpi/mpi-pow.c | 1 - lib/memcpy_kunit.c | 5 ----- lib/random32.c | 1 - lib/rhashtable.c | 2 -- lib/test_bpf.c | 3 --- lib/test_lockup.c | 2 +- lib/test_maple_tree.c | 8 -------- lib/test_rhashtable.c | 10 ---------- 9 files changed, 1 insertion(+), 33 deletions(-) diff --git a/lib/crc32test.c b/lib/crc32test.c index 9b4af79412c4..3eee90482e9a 100644 --- a/lib/crc32test.c +++ b/lib/crc32test.c @@ -729,7 +729,6 @@ static int __init crc32c_combine_test(void) crc_full == test[i].crc32c_le)) errors++; runs++; - cond_resched(); } } @@ -817,7 +816,6 @@ static int __init crc32_combine_test(void) crc_full == test[i].crc_le)) errors++; runs++; - cond_resched(); } } diff --git a/lib/crypto/mpi/mpi-pow.c b/lib/crypto/mpi/mpi-pow.c index 2fd7a46d55ec..074534900b7e 100644 --- a/lib/crypto/mpi/mpi-pow.c +++ b/lib/crypto/mpi/mpi-pow.c @@ -242,7 +242,6 @@ int mpi_powm(MPI res, MPI base, MPI exp, MPI mod) } e <<= 1; c--; - cond_resched(); } i--; diff --git a/lib/memcpy_kunit.c b/lib/memcpy_kunit.c index 440aee705ccc..c2a6b09fe93a 100644 --- a/lib/memcpy_kunit.c +++ b/lib/memcpy_kunit.c @@ -361,8 +361,6 @@ static void copy_large_test(struct kunit *test, bool use_memmove) /* Zero out what we copied for the next cycle. */ memset(large_dst + offset, 0, bytes); } - /* Avoid stall warnings if this loop gets slow. */ - cond_resched(); } } @@ -489,9 +487,6 @@ static void memmove_overlap_test(struct kunit *test) for (int s_off = s_start; s_off < s_end; s_off = next_step(s_off, s_start, s_end, window_step)) inner_loop(test, bytes, d_off, s_off); - - /* Avoid stall warnings. */ - cond_resched(); } } } diff --git a/lib/random32.c b/lib/random32.c index 32060b852668..10bc804d99d6 100644 --- a/lib/random32.c +++ b/lib/random32.c @@ -287,7 +287,6 @@ static int __init prandom_state_selftest(void) errors++; runs++; - cond_resched(); } if (errors) diff --git a/lib/rhashtable.c b/lib/rhashtable.c index 6ae2ba8e06a2..5ff0f521bf29 100644 --- a/lib/rhashtable.c +++ b/lib/rhashtable.c @@ -328,7 +328,6 @@ static int rhashtable_rehash_table(struct rhashtable *ht) err = rhashtable_rehash_chain(ht, old_hash); if (err) return err; - cond_resched(); } /* Publish the new table pointer. */ @@ -1147,7 +1146,6 @@ void rhashtable_free_and_destroy(struct rhashtable *ht, for (i = 0; i < tbl->size; i++) { struct rhash_head *pos, *next; - cond_resched(); for (pos = rht_ptr_exclusive(rht_bucket(tbl, i)), next = !rht_is_a_nulls(pos) ? rht_dereference(pos->next, ht) : NULL; diff --git a/lib/test_bpf.c b/lib/test_bpf.c index ecde4216201e..15b4d32712d8 100644 --- a/lib/test_bpf.c +++ b/lib/test_bpf.c @@ -14758,7 +14758,6 @@ static __init int test_skb_segment(void) for (i = 0; i < ARRAY_SIZE(skb_segment_tests); i++) { const struct skb_segment_test *test = &skb_segment_tests[i]; - cond_resched(); if (exclude_test(i)) continue; @@ -14787,7 +14786,6 @@ static __init int test_bpf(void) struct bpf_prog *fp; int err; - cond_resched(); if (exclude_test(i)) continue; @@ -15171,7 +15169,6 @@ static __init int test_tail_calls(struct bpf_array *progs) u64 duration; int ret; - cond_resched(); if (exclude_test(i)) continue; diff --git a/lib/test_lockup.c b/lib/test_lockup.c index c3fd87d6c2dd..9af5d34c98f6 100644 --- a/lib/test_lockup.c +++ b/lib/test_lockup.c @@ -381,7 +381,7 @@ static void test_lockup(bool master) touch_nmi_watchdog(); if (call_cond_resched) - cond_resched(); + cond_resched_stall(); test_wait(cooldown_secs, cooldown_nsecs); diff --git a/lib/test_maple_tree.c b/lib/test_maple_tree.c index 464eeb90d5ad..321fd5d8aef3 100644 --- a/lib/test_maple_tree.c +++ b/lib/test_maple_tree.c @@ -2672,7 +2672,6 @@ static noinline void __init check_dup(struct maple_tree *mt) rcu_barrier(); } - cond_resched(); mt_cache_shrink(); /* Check with a value at zero, no gap */ for (i = 1000; i < 2000; i++) { @@ -2682,7 +2681,6 @@ static noinline void __init check_dup(struct maple_tree *mt) rcu_barrier(); } - cond_resched(); mt_cache_shrink(); /* Check with a value at zero and unreasonably large */ for (i = big_start; i < big_start + 10; i++) { @@ -2692,7 +2690,6 @@ static noinline void __init check_dup(struct maple_tree *mt) rcu_barrier(); } - cond_resched(); mt_cache_shrink(); /* Small to medium size not starting at zero*/ for (i = 200; i < 1000; i++) { @@ -2702,7 +2699,6 @@ static noinline void __init check_dup(struct maple_tree *mt) rcu_barrier(); } - cond_resched(); mt_cache_shrink(); /* Unreasonably large not starting at zero*/ for (i = big_start; i < big_start + 10; i++) { @@ -2710,7 +2706,6 @@ static noinline void __init check_dup(struct maple_tree *mt) check_dup_gaps(mt, i, false, 5); mtree_destroy(mt); rcu_barrier(); - cond_resched(); mt_cache_shrink(); } @@ -2720,7 +2715,6 @@ static noinline void __init check_dup(struct maple_tree *mt) check_dup_gaps(mt, i, false, 5); mtree_destroy(mt); rcu_barrier(); - cond_resched(); if (i % 2 == 0) mt_cache_shrink(); } @@ -2732,7 +2726,6 @@ static noinline void __init check_dup(struct maple_tree *mt) check_dup_gaps(mt, i, true, 5); mtree_destroy(mt); rcu_barrier(); - cond_resched(); } mt_cache_shrink(); @@ -2743,7 +2736,6 @@ static noinline void __init check_dup(struct maple_tree *mt) mtree_destroy(mt); rcu_barrier(); mt_cache_shrink(); - cond_resched(); } } diff --git a/lib/test_rhashtable.c b/lib/test_rhashtable.c index c20f6cb4bf55..e5d1f272f2c6 100644 --- a/lib/test_rhashtable.c +++ b/lib/test_rhashtable.c @@ -119,7 +119,6 @@ static int insert_retry(struct rhashtable *ht, struct test_obj *obj, do { retries++; - cond_resched(); err = rhashtable_insert_fast(ht, &obj->node, params); if (err == -ENOMEM && enomem_retry) { enomem_retries++; @@ -253,8 +252,6 @@ static s64 __init test_rhashtable(struct rhashtable *ht, struct test_obj *array, rhashtable_remove_fast(ht, &obj->node, test_rht_params); } - - cond_resched(); } end = ktime_get_ns(); @@ -371,8 +368,6 @@ static int __init test_rhltable(unsigned int entries) u32 i = get_random_u32_below(entries); u32 prand = get_random_u32_below(4); - cond_resched(); - err = rhltable_remove(&rhlt, &rhl_test_objects[i].list_node, test_rht_params); if (test_bit(i, obj_in_table)) { clear_bit(i, obj_in_table); @@ -412,7 +407,6 @@ static int __init test_rhltable(unsigned int entries) } for (i = 0; i < entries; i++) { - cond_resched(); err = rhltable_remove(&rhlt, &rhl_test_objects[i].list_node, test_rht_params); if (test_bit(i, obj_in_table)) { if (WARN(err, "cannot remove element at slot %d", i)) @@ -607,8 +601,6 @@ static int thread_lookup_test(struct thread_data *tdata) obj->value.tid, obj->value.id, key.tid, key.id); err++; } - - cond_resched(); } return err; } @@ -660,8 +652,6 @@ static int threadfunc(void *data) goto out; } tdata->objs[i].value.id = TEST_INSERT_FAIL; - - cond_resched(); } err = thread_lookup_test(tdata); if (err) {