重启前刷新 Core Duo 缓存?

发布于 2024-10-05 12:03:11 字数 280 浏览 0 评论 0原文

假设我正在通过 L1/L2 缓存写入 Core Duo 系统上的 RAM 位置。

假设我要写入 RAM 中的持久位置,并且不久之后 Linux 内核就会出现恐慌。该位置是持久的,这意味着它不会在 CPU 重新启动期间重新初始化,并且会在重新启动后被拾取。

Linux 会在重启/紧急情况下刷新 CPU 缓存吗?

CPU会在重启前刷新缓存吗?

或者我应该手动执行此操作?如何?

更新:我的缓存不是直写式的。

问题是,CPU 规范是否定义了这种行为?

suppose I'm writing to a RAM location on a Core Duo system through L1/L2 cache.

Suppose I am going to write to a persistent location in RAM and panic Linux kernel soon after that. The location is persistent meaning that it won't be re-inited during CPU reboot and will be picked up after reboot.

Will Linux flush CPU cache as a part of reboot/panic?

Will the CPU flush cache before rebooting?

Or should I do that manually? How?

Update: my cache is not write-through.

The question is, does the CPU spec define this behavior?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

蓝咒 2024-10-12 12:03:11

也许最合适的方法是将包含持久位置的页面标记为不可缓存。这样,对持久位置的写入将始终绕过缓存(有效地直写)。当然,您的缓存可能是直写式的,因此这可能是多余的 - 您应该首先检查这一点。

Probably the most appropriate way to do this would be to mark the page containing the persistent location(s) as non-cacheable. That way writes to the persistent location(s) would always bypass the cache (effectively write-through). Of course it may be that your cache is write-through anyway, so this may be redundant - you should check this first.

避讳 2024-10-12 12:03:11

高速缓存可能不会被刷新,因为系统诊断或调试器可能需要由用户、系统工程师或IT支持人员运行来诊断和转储计算机状态。缓存可能会在启动时刷新,也可能不刷新,这取决于事件中使用的操作系统、编程语言和应用程序的类型和版本。它可能是启动时的一个可选选项(从任何 BIOS),但它可能会在开机时初始化,但不一定在热启动时(如果可用)。

The cache may not be flushed because a system diagnostic or debugger may need to be run by a user, system engineer or IT support person to diagnose and dump the computer state. The cache may be flushed at startup or not and this depends on the type and version of operating system, programming language and application in use at the event. It may be a selectable option (from any BIOS) at start up time but It would likely be initialized at poweron but not necessarily at warm restart if available.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文