跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[Linux] Linux 桌面使用推荐打开 preempt=full

发表于

Linux Kernel 5.12 后支持 PREEMPT_DYNAMIC,与 realtime 版本需要修改 Kernel 代码不同,它允许在运行时切换内核的抢占模式,而不需要重新编译内核。目前支持的模式有:

  • PREEMPT_NONE: 无抢占模式,这种模式适用于 CPU 密集型任务,可以最大化吞吐量。

  • PREEMPT_VOLUNTARY: 默认模式。内核线程在某些特定的程序点点上可能会被抢占。相比 PREEMPT_NONE ,它提供了一定的低延迟,但不会像 PREEMPT 模式那样频繁地导致上下文切换。

  • PREEMPT_FULL: 这个模式下,内核是完全抢占的。当一个更高优先级的任务准备好运行时,当前运行的内核线程可能会被立即抢占。这个模式适合对实时性有较高要求的应用程序。

一般来说,对服务器使用而言,重要的是吞吐量,但对于桌面应而言,延迟对于使用者更为敏感,尤其是多媒体音视频游戏使用。对于桌面使用推荐激活 full 模式。

如果当前内核编译时使用 PREEMPT_DYNAMIC(可以通过 uname -a 命令检查) ,则可以通过以下方式激活 full 模式:

通过修改 grub 引导内核参数,添加 preempt=full 来激活 full 模式

# 编辑 grub 配置文件
sudo vim /etc/default/grub

# 找到如下行,加入 preempt=full 内核参数
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
# 修改为
GRUB_CMDLINE_LINUX_DEFAULT="quiet preempt=full"

# 更新 grub
sudo update-grub

reddit 上有一些讨论可供参考: https://www.reddit.com/r/Fedora/comments/158fy6x/ive_turned_preemptfull_on_and_it_solved_most_of/

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.