From nobody Fri Jan 16 16:26:11 2026 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dt4wz66yhz6NVcs for ; Fri, 16 Jan 2026 16:26:27 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dt4wz5bpNz3YdX; Fri, 16 Jan 2026 16:26:27 +0000 (UTC) (envelope-from theraven@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768580787; h=from:from: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; bh=MHbK/325wpeeNIjNR5aIyH1kpe8CqDEvlqEXrIXWhhE=; b=fYEZDCu5sOj7ncz9DWIe1/fD5/5SbDWAXjBfbPoh1uN2//ljjBzZp/kYYBOAJK+/dw7T// zP3CJuVoZPxy8hqS62RVATMdnIjW4SQvK993c5QmivLmOwHyE0YZapRqCpITAIJGQzLR2A S6jRU0EdnodaPj8fv/byQNfnTYhvvixvbWrUT3g50EQWG79QS3u1fzDvr3q4Rk46RomMpm S+Ws4f2zAYMWfACnFaCs7clXE/rm3K2Ys0mxbNizMglBASQUUElbJ0fi9yG4WeD/5CFNj0 Q8NxjjY9unVDjbnBKZtbxGFHg8ggHD8UJ27WmK0xJTi0YE8nFRpv1NkzswvYuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768580787; h=from:from: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; bh=MHbK/325wpeeNIjNR5aIyH1kpe8CqDEvlqEXrIXWhhE=; b=JyZO+am8FpNRoHC+PbfHAmB2XvmYrL3qHwN+BjrKsImnL5gFXN0QGdMb2yktrXk5HvhnUW GyfHLZppBApSGMTrVkLVcBCLTRKkHCmN87SqZ5ogfmWEO/h0GOuxvlLslb+Nf9ziEtJN6D u9JoHeNE89TQ0EeZu8/QsptipPsS8pR3B7ln1m4gfyDC2xRykBYPISFG70FfwBw7I/3/Ai g7EoPW2iO1FR4E0oLuFniNPK2QkLPzIlZjpRwCfbFuQVVKEAmLLOdre507nvdr8donp7qj HQVV4IvfQn00AfyKmXP8DFYTsvqUUagswbmPY/IzieiXvZH2upJNMekhMQk5nA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768580787; a=rsa-sha256; cv=none; b=UMbR3KCT/HJxlrMyrZNKk3r8Ibow5d9UShEB+juePHHmbour+nSFEYeJVTVIb6XCqtzIQi bOixmDD83F/n9Try1wcvntFoLHWoxJuCRaVTxkKkWn5P6vk8B7GTQYKJ8leeyLLyAW5BZZ M6xXbIgImxRzP8qcCvvrhXQ0rxpvt0hL30qULZUDTBnpYXlFclf7Tr6oQFVn4Elp6sRigB XnmI3Ex7/jcIslQ67rMI1ZLQmXtS1/94UftChz3BWW/a6Eccba6gCbLPkWWB906rzDjh1U s1+LeFF7/+lmn5Ohuh8YMv/bD1BI0nY46/BDHzx1/S/ZHDEsjUEUmI7qqarOWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from smtp.theravensnest.org (smtp.theravensnest.org [45.77.103.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: theraven) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dt4wz4qhmz15X3; Fri, 16 Jan 2026 16:26:27 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from smtpclient.apple (host86-143-41-230.range86-143.btcentralplus.com [86.143.41.230]) by smtp.theravensnest.org (Postfix) with ESMTPSA id 8342A11432; Fri, 16 Jan 2026 16:26:26 +0000 (GMT) Content-Type: text/plain; charset=utf-8 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.300.41.1.7\)) Subject: Re: HMP scheduling on FreeBSD From: David Chisnall In-Reply-To: Date: Fri, 16 Jan 2026 16:26:11 +0000 Cc: Minsoo Choo , Mark Millard , Shawn Webb , freebsd-hackers Content-Transfer-Encoding: quoted-printable Message-Id: <96C5C61E-7945-4A08-A952-5F9BA085B985@FreeBSD.org> References: <0Ng09S3rEB0BvT9vzHqVKU7rWxoad96kjEc7U2LCwDFJKmmswXujip7qbRlo_BIhNKcI7d-2CUHdp9Dxr3-7hhafpD6uagJSFUCjtC9qRr4=@proton.me> <5a2sxxiqkafxdolq362ivmpyfemi5wc75zknnuzqdhstezumrq@2p7o2dmf7r6n> <46336160-6437-4c3b-8f6e-afef62f7bf83@yahoo.com> To: Adrian Chadd X-Mailer: Apple Mail (2.3864.300.41.1.7) On 16 Jan 2026, at 04:37, Adrian Chadd wrote: >=20 > I've had to debug systems in the past with the big/little > cores having different cache line sizes For those following at home: This is explicitly disallowed by Arm, but some people didn=E2=80=99t = read the docs before shipping SoCs. The issue is that there are = instructions like DC ZVA, which zero a cache line. If you probe the = cache line size and start doing bulk zeroing, then are migrated to a = core with a different line size, this is a problem. You either zero = every alternate chunk, or you zero more than you expected to. Both are = bad. Arm=E2=80=99s memcpy-acceleration instructions have a similar property = but are actually designed. They are expressed as three instructions: 1. Do the annoying unaligned thing at the start. 2. Do the fast bulk operation. 3. Do the annoying unaligned thing at the end. In small cores, they=E2=80=99re likely to be implemented as these three = separate steps. In big cores, instructions 1 and 3 are likely to be = nops and all of the work will be done in instruction 2. This means that = migrating from a big core to a small one after instruction 1, or in the = opposite direction after 2 can cause incorrect behaviour. Arm documents the way to probe whether fixup is required and what the = fixup needs to be. But this means that the MD migration code needs = hooks from the MI bit in the scheduler to say =E2=80=98I am migrating = from this kind of core to this kind, please apply any fixups that are = necessary=E2=80=99. This probably won=E2=80=99t be the last CPU feature that looks like = this. David