Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp586026lqp; Fri, 5 Apr 2024 02:57:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUXZnXVGlOXXAQX+ljpRhdm12HN/Y6dDUlMfgl0M4kYag/yXE65fgncKz9Cjv5iLoI2O92EDzgzBVJ/4P6unHER2u4ztnEjKkZoMgY/wg== X-Google-Smtp-Source: AGHT+IFID4V5LcSfeoSi8IZNsFxySkG1LdhLHwTVoNrr68MNOwwBDAWwW+ihZoNBYeo5DVtEvszu X-Received: by 2002:a05:622a:552:b0:431:3c89:762 with SMTP id m18-20020a05622a055200b004313c890762mr899586qtx.12.1712311036102; Fri, 05 Apr 2024 02:57:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712311036; cv=pass; d=google.com; s=arc-20160816; b=tjqV/H4OVgHr2hg+SF2Z5bLBKwglbOedgfJLE1KmIE0UwqW58bAYDhPR5wwl8qtHhn nw1+U9YvMI1oS/c4lh8UT/VQBZBzkOg5rzC4b9ZQr1NmLFMzCz6qh+WbZA/sevt6q7PU nuIaofWc3BUIS3UyfN0g/MVPK7vAVYkobC3Ms6MbFbd1I1UYh6ltyIsgAH7fd8YkHIGg W21icDREoCMevW747XimmLiG68bPD8ibQ2tB7LkXGk0vz27KWo5R1N4HUx3UNhz8dbHs elMrxxX2Tlow6bW61Sqv49lYokQcSHsl5cA3US8nSdtvwzNmcpj91X58sKtp/lHsS+j1 jpBQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=jxtlWvFuRbI1Kb5N0cEx9N11uVngbaU7UEgFI999w0U=; fh=r9IFOUydlB5usmK3BrbQlNRT4xvLW5hsLENwA8EJPoo=; b=CkWftJqExrVl7SekVWStcHMGagZuryNxbNIUy5n2ZzDhzRwsoVWesWphUp1wRs/uTM qBBPfuSYE7eS+uLSBNidf+bWu3t86O02rhfHrCjj31omnxNzyxCkQ3j9K5mwOdBBCQHW 8OkCJVCTAbx++A4WXcNFRXOeWrVQ6aXFaofEX7WSLZXUDIraGcc5d3Y2FcHWrTjPffrm nw6xkh/EgtSXzzZ1ZjUPVsNVYtLo5aB69nWFnMON0h+5P56Yiqr3IxxXhQAQJV/l2h0w nWx9MsLtVBAnP7ba2NbitWzNRNRyPpnr/jOMO+5GTfdBiCTwfaSZ2Tjs+sgswkTOispn 8EjQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-132780-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132780-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=huawei.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q20-20020a05622a04d400b00431819c0570si1374305qtx.721.2024.04.05.02.57.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 02:57:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132780-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-132780-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132780-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id F15EC1C22255 for ; Fri, 5 Apr 2024 09:57:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DD9EF16C426; Fri, 5 Apr 2024 09:54:46 +0000 (UTC) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D30316ABF5; Fri, 5 Apr 2024 09:54:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712310886; cv=none; b=CvEa2DPsnvxJSLe38C6tDNbxCJyJyZ3gXFDeA18TCY50kFMiu4G3gmZQ8+p7KOEx1NT2C1QqjIlodbep5iFi5IHhvVX0Jot2eaJ8IOYb9ZzWSdY8bH/l1AnlixEfm/W1DuTAt99Ju8E8LNCKn6gGF2Gr8YaYvH+hMlzRL9F3doI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712310886; c=relaxed/simple; bh=euQpmpK7ReuS/moGvTZTFeecDsgmJlRZeUwPBZ9hj2E=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=gQzjWiFFOicHwEc34sVZ4mse3FTdWNO0sGBWQvdkznBXYUYlj+wQ/rLSJpVtQoGyrmbxwB0w1PKt094DOKla+F/lqxqmzShipD5zn29BGooRmxOnUZgapTW9hi4dTMLHbSs9sLZ5iK5vt2MlzGSTp41NTr2o2c0M6uD8iQQwueo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4V9v1r3RCBz6J6j6; Fri, 5 Apr 2024 17:53:20 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id C57731400D1; Fri, 5 Apr 2024 17:54:42 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 5 Apr 2024 10:54:42 +0100 Date: Fri, 5 Apr 2024 10:54:41 +0100 From: Jonathan Cameron To: Dawei Li CC: , , , , , , , , , , , Subject: Re: [PATCH v3 08/10] perf/hisi_uncore: Avoid placing cpumask on the stack Message-ID: <20240405105441.00006f59@Huawei.com> In-Reply-To: <20240403155950.2068109-9-dawei.li@shingroup.cn> References: <20240403155950.2068109-1-dawei.li@shingroup.cn> <20240403155950.2068109-9-dawei.li@shingroup.cn> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml100003.china.huawei.com (7.191.160.210) To lhrpeml500005.china.huawei.com (7.191.163.240) On Wed, 3 Apr 2024 23:59:48 +0800 Dawei Li wrote: > In general it's preferable to avoid placing cpumasks on the stack, as > for large values of NR_CPUS these can consume significant amounts of > stack space and make stack overflows more likely. > > Use cpumask_any_and_but() to avoid the need for a temporary cpumask on > the stack. > > Suggested-by: Mark Rutland > Reviewed-by: Mark Rutland > Signed-off-by: Dawei Li Acked-by: Jonathan Cameron