From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4087D1C5D5E for ; Thu, 29 Jan 2026 23:53:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769730796; cv=none; b=KJAaZhy5vNsqr2JZw+Lh/yl/Uzw26wpemSGU0WfE8+Gs9tdhYpNfvaEVGMFgVxsABp6ug60q1DqhmzS4WLzAsUrv6zfzMJ+O4EOsjGNHjmsYANaGWE+J86aAExVEDU4nf3D03RuC/gBOQ6BvkLag8XID1mOxXITs71xpDxLEak4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769730796; c=relaxed/simple; bh=0TKcMYGC45Pj1NeFS56tIOTMpJjenlLeDK6o7cBLWN4=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=iu6h4RhNeXb8cu0L8zObmysphlhy+JR3dFhzjSE68p+2Wf5gt5VCaiiUtWGuRWLQvyaF1lOE1sPRVFWKyvuKKa5zLNtXSOHQqqMc+b1E3WWdthLVco9w8WKb7T9wE9PS22BGiie4H+K1xHGUUUx5zt/bsXiVYPr8nqMcZlZtfPA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=sHgzK8Jy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="sHgzK8Jy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D340C4CEF7; Thu, 29 Jan 2026 23:53:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1769730795; bh=0TKcMYGC45Pj1NeFS56tIOTMpJjenlLeDK6o7cBLWN4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=sHgzK8Jy5P/vp1xZG17+OtWZvp6VWWQQYglM0ALWanRFtHAXV8vMd0XUa+Q7uJFak WXZZDa9j1P9WfkQfP5YW0LrX3EH+VMEvtzTQoCIkfrt9ZdZrCJeMGQMp46rA9U96jT 66KKWAyQMWtPi4qK+glS8ClBLQHYKTqm4B70jTgA= Date: Thu, 29 Jan 2026 15:53:15 -0800 From: Andrew Morton To: Matteo Croce Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] KUnit: memcpy: add benchmark Message-Id: <20260129155315.5897a90efedbc6988ebb3708@linux-foundation.org> In-Reply-To: References: <20260129004328.102770-1-teknoraver@meta.com> <20260129152035.1fbdddb214c75875b67ba5b9@linux-foundation.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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 On Fri, 30 Jan 2026 00:36:30 +0100 Matteo Croce wrote: > > Is cond_resched() inside preempt_disable() actually legal? > > > > Might be, but it doesn't make a lot of sense, does it? > > > > > + } > > > + preempt_enable(); > > > + > > > > Right. In a previous version I was doing > preempt_disable()/preempt_enable() around the two ktime_get_ns(), but > then I thought that enabling and disabling preemption 100 time was too > much. > I'll restore the preempt macros around the actual copy and remove > cond_resched(). OK. local_irq_save() would be more accurate. Does it really need to copy 4MB? Smaller would make local_irq_disable() more viable. kmalloc(4MB) does seem to be pushing our luck. I'm spotting ./arch/arm/configs/pxa_defconfig:CONFIG_ARCH_FORCE_MAX_ORDER=8 which is 1MB?