Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp415373lqt; Thu, 18 Apr 2024 22:15:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVG5A4NVLPb0h4yqw/ocFdPKSaykmR9hIv3IAYlVU0+R3WQG5G9q9SQh2ZYh3LdaniuhfjG36bAHOpPgoPMuYltUIF0m7PlsjiWzO0zTA== X-Google-Smtp-Source: AGHT+IGGQbr/T/6fSifKQWWzKYqKy3z6c1J4HWxwIWl4aPp73xtOQaxkIdj+Uj7Jy+LLqiA9LAUm X-Received: by 2002:a17:906:3410:b0:a55:201f:4b62 with SMTP id c16-20020a170906341000b00a55201f4b62mr827168ejb.0.1713503713596; Thu, 18 Apr 2024 22:15:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713503713; cv=pass; d=google.com; s=arc-20160816; b=Iyd1/VrERke5ibKGZlwNBOUiFCPMndaWsF7R10fjXhbfdB3U8D+AA0HqISYLh6uvNn JFTyPDnsJfukiyKFV5+sELw6vGdeMc7EflE+pmM2Mt4MsD8DAryhMyUd9zmr1y6o5IRh lBsjEEtDGcWqMBstomwRfMq3t26huI2+wWdMtw16h5MkR8uontYKTAIkOjRxEABXVKDc aqES3fX6eTwcNm64Hid/UzTl58oCJIKkENUV10YnmZGorLnpdQhiQYAvUvhp9j/WrVMC JOpvdCMau0Oaolq2B4JZX0H8eCarUxaHknAXCRQG9sbhV65SllBypDdzGpNkfchIZN3S Cx4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature; bh=u/go6+i7e7RyNSuoXpPTIqP0/jBntZGsQA2HrLzeU90=; fh=1jjd/CvD+Z2W8HLWXZN5YIYg9x9kG7zaJgJi1INjUWA=; b=G8fzos2gcZp+O7PcTSpT9RQUfB2gftWRt0mVoKVIHsRK0h3S12GInGsda4n+z9CAYV JLqCrEUr1kcoCK5YI96HoWCq+Y2dpEKLR4kc+CkqIGogABC3AYT8krfhcDbPUfNF9LEP YO48UIjlBpK1xCa8qgry+4JaBVGcv7KMyruYqUlXXH8X4DY95oI/cdKufh6nZkdNsrfU D3LFUB4rSLM3EadSkszcDRVkulKg/yX38sXQVBblyI8O13ORGbP+XqOVwgIMRU+s5PyV 6aF9aTAUSLD8dvK7tGd0tn1heKhqJpqYWiGlviYW/frkut8VdizhyYeNmMiUcCxHpX48 30Ag==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa1 header.b=kGLIj4zl; dkim=neutral (no key) header.i=@ravnborg.org header.s=ed1; arc=pass (i=1 dkim=pass dkdomain=ravnborg.org); spf=pass (google.com: domain of linux-kernel+bounces-151009-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151009-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id la26-20020a170906ad9a00b00a522f728d92si1718458ejb.424.2024.04.18.22.15.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 22:15:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151009-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa1 header.b=kGLIj4zl; dkim=neutral (no key) header.i=@ravnborg.org header.s=ed1; arc=pass (i=1 dkim=pass dkdomain=ravnborg.org); spf=pass (google.com: domain of linux-kernel+bounces-151009-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151009-linux.lists.archive=gmail.com@vger.kernel.org" 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 379DD1F2266C for ; Fri, 19 Apr 2024 05:15:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5695ABE66; Fri, 19 Apr 2024 05:15:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ravnborg.org header.i=@ravnborg.org header.b="kGLIj4zl"; dkim=permerror (0-bit key) header.d=ravnborg.org header.i=@ravnborg.org header.b="XKuHJR3l" Received: from mailrelay1-1.pub.mailoutpod3-cph3.one.com (mailrelay1-1.pub.mailoutpod3-cph3.one.com [46.30.211.240]) (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 C6C81BA2B for ; Fri, 19 Apr 2024 05:15:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.30.211.240 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713503705; cv=none; b=CRBCnoPusurV1HYNJaOlIs1xy8wWx7HlWa0f6kFfM/ptN65IOK6Ts1gC365pkSMz6sh2SnhaUbaGIMRSSh/OtLOvL5zwpt1En6s2Ho6Q0FJoZMvKreNjyPEZVlbSLPIlizjsC9y9Uzkt2h8UYeGgQrM5rM6Mo7+66vnGLFUt0jo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713503705; c=relaxed/simple; bh=uN8JfYQ/aBEsywlESJUlU0Btqt0nXX9MQQidv/c8OSA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XLav5zW1tCOE5yKYGlUmONaq1FDCQW+VU9RTGcO73PyymzxgvxInoKwkLfromymz9qSiCasVwteqOQW2WA32MF/aLQLJadwXixszlk27WmTOW6WsL+MYNtfXwHY4d5l/trMb5xt5d0cBaV27yx5UZjI5tleSTyFlJojifMnfoTE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org; spf=none smtp.mailfrom=ravnborg.org; dkim=pass (2048-bit key) header.d=ravnborg.org header.i=@ravnborg.org header.b=kGLIj4zl; dkim=permerror (0-bit key) header.d=ravnborg.org header.i=@ravnborg.org header.b=XKuHJR3l; arc=none smtp.client-ip=46.30.211.240 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ravnborg.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravnborg.org; s=rsa1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=u/go6+i7e7RyNSuoXpPTIqP0/jBntZGsQA2HrLzeU90=; b=kGLIj4zl3nZh5NPG9HxXvsvmBgJ04w7Rum2A5Mt39cNRvmWQbP/1QE/wnztuQ/QQ2pUtg5yeAEvMt kV3ADRncWjmrKbDjAPN/ihny18P9q8Xs1PYV7jiT9/TgZ0akaBWlNkSVjyTslHs2cqBHbZw35W4LTA rb6sMFQvNcI+rnQl0LpautsKNovRDA7s+vq5LAIVSqV9cSsWNk3xu+6Ur2h3PjqY9EHOD3rjljrAju UDNlPDsXzk/2iZcxpelBSy7Par8t4wldrx3P+gi9Ff0ePcMmub+y10rpyarIJonmbEGK6gPxpylq8K 9cuK9Du48/w3u9b80zfCYTvTiUFguMQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ravnborg.org; s=ed1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=u/go6+i7e7RyNSuoXpPTIqP0/jBntZGsQA2HrLzeU90=; b=XKuHJR3lOYplrKFaJTtPySHfacKIGmSnuGzDgCnksG7MIX6+YIEVxQ5oZacqLgM2I9FUmdnkMwzxR Mzmm3KvAg== X-HalOne-ID: 9b761f07-fe0b-11ee-b787-bf3d7f4c9d3b Received: from ravnborg.org (2-105-2-98-cable.dk.customer.tdc.net [2.105.2.98]) by mailrelay1.pub.mailoutpod3-cph3.one.com (Halon) with ESMTPSA id 9b761f07-fe0b-11ee-b787-bf3d7f4c9d3b; Fri, 19 Apr 2024 05:13:52 +0000 (UTC) Date: Fri, 19 Apr 2024 07:13:50 +0200 From: Sam Ravnborg To: Dawei Li Cc: davem@davemloft.net, andreas@gaisler.com, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/5] Remove onstack cpumask var usage Message-ID: <20240419051350.GA558245@ravnborg.org> References: <20240418104949.3606645-1-dawei.li@shingroup.cn> 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-Disposition: inline In-Reply-To: <20240418104949.3606645-1-dawei.li@shingroup.cn> Hi Dawei, On Thu, Apr 18, 2024 at 06:49:44PM +0800, Dawei Li wrote: > Hi, > > This series aims at removing on-stack cpumask var usage for sparc arch. > > Generally 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. Took a quick look at the patches, looks good except the one the bot already complained about. A quick grep shows a few more cases where we have an on-stack cpumask in sparc code. kernel/ds.c: cpumask_t mask; kernel/leon_kernel.c: cpumask_t mask; kernel/leon_smp.c:static void leon_cross_call(void *func, cpumask_t mask, unsigned long arg1, kernel/sun4d_smp.c:static void sun4d_cross_call(void *func, cpumask_t mask, unsigned long arg1, Do you plan to look at the other on-stack users too? It would be nice to see them all gone in one patch-set. Sam