{"id":40287,"date":"2026-10-19T10:24:53","date_gmt":"2026-10-19T02:24:53","guid":{"rendered":"https:\/\/www.deepin.org\/?p=40287"},"modified":"2026-10-19T10:32:12","modified_gmt":"2026-10-19T02:32:12","slug":"hands-on-deepin-loongarch-kernel-fixes","status":"publish","type":"post","link":"https:\/\/www.deepin.org.cn\/zh\/hands-on-deepin-loongarch-kernel-fixes\/","title":{"rendered":"\u4ece\u6392\u67e5\u5230\u5408\u5165\uff1adeepin LoongArch \u5185\u6838\u4fee\u590d\u5b9e\u6218"},"content":{"rendered":"<img loading=\"lazy\" class=\"alignnone size-full wp-image-40288\" src=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2026\/10\/261016_\u526f\u672c.png\" alt=\"\" width=\"900\" height=\"383\" srcset=\"https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/261016_\u526f\u672c.png 900w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/261016_\u526f\u672c-300x128.png 300w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/261016_\u526f\u672c-150x64.png 150w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/261016_\u526f\u672c-768x327.png 768w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/261016_\u526f\u672c-24x10.png 24w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/261016_\u526f\u672c-36x15.png 36w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/261016_\u526f\u672c-48x20.png 48w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/p>\n<section>\n<section>\n<section>\n<section>\n<p data-pm-slice=\"0 0 []\">\u60f3\u8c61\u4e00\u4e0b\u8fd9\u6837\u7684\u573a\u666f\uff1a\u7cfb\u7edf\u5b89\u88c5\u6b63\u8fdb\u884c\u5230\u4e00\u534a\uff0c\u673a\u5668\u6beb\u65e0\u5f81\u5146\u5730\u5361\u6b7b\u4e86\uff0c\u800c\u67e5\u4e32\u53e3\u65e5\u5fd7\uff0c\u53ea\u6709\u51e0\u6761\u96f6\u6563\u7684\u5f02\u5e38\uff0c\u5185\u6838\u95ee\u9898\u7684\u9ebb\u70e6\u5c31\u5728\u8fd9\u91cc\u3002\u51fa\u9519\u7684\u90a3\u4e00\u77ac\u95f4\u7a0d\u7eb5\u5373\u901d\uff0c\u7559\u4e0b\u6765\u7684\u7ebf\u7d22\u8fd8\u81ea\u76f8\u77db\u76fe\uff0c\u771f\u6b63\u7684\u6839\u6e90\u85cf\u5728\u6beb\u4e0d\u8d77\u773c\u7684\u4e00\u5c0f\u6bb5\u6267\u884c\u8def\u5f84\u91cc\uff0c\u6392\u67e5\u8d77\u6765\u50cf\u5927\u6d77\u635e\u9488\u3002<\/p>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section>\n<section data-pm-slice=\"3 3 []\">\n<section>\n<section>\n<section>\n<section data-pm-slice=\"3 3 [&quot;para&quot;,{&quot;tagName&quot;:&quot;section&quot;,&quot;attributes&quot;:{&quot;style&quot;:&quot;-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;font-size: 16px;color: rgb(62, 62, 62);&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;,&quot;data-layout-id&quot;:null},&quot;para&quot;,{&quot;tagName&quot;:&quot;section&quot;,&quot;attributes&quot;:{&quot;style&quot;:&quot;-webkit-tap-highlight-color: transparent;margin: 10px 0px 17px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;text-align: left;justify-content: flex-start;display: flex;flex-flow: row;&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;,&quot;data-layout-id&quot;:null},&quot;para&quot;,{&quot;tagName&quot;:&quot;section&quot;,&quot;attributes&quot;:{&quot;style&quot;:&quot;-webkit-tap-highlight-color: transparent;margin: 0px 6px 0px 0px;padding: 23px 28px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;display: inline-block;width: auto;vertical-align: top;align-self: flex-start;flex: 100 100 0%;border-style: dashed;border-width: 1px;border-color: rgb(154, 202, 251);border-radius: 12px;overflow: hidden;height: auto;box-shadow: rgb(231, 246, 255) 6px 6px 0px 0px;&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;,&quot;data-layout-id&quot;:null}]\">deepin \u6587\u4ef6\u7ba1\u7406\u5668\u63d0\u4f9b\u6587\u4ef6\u7d22\u5f15\u529f\u80fd\uff0c\u7d22\u5f15\u4f7f\u7528\u7684\u5185\u6838\u6a21\u5757\u901a\u8fc7 VFS \u7684 kretprobe hook \u65b9\u6cd5\u6765\u5bf9\u6587\u4ef6\u7cfb\u7edf\u51fd\u6570\u8fdb\u884c\u63d2\u6869\uff0c\u5728\u6587\u4ef6\u8bbf\u95ee\u8fc7\u7a0b\u4e2d\u91c7\u96c6\u7d22\u5f15\u6240\u9700\u7684\u4fe1\u606f\u3002\u8fd1\u65e5\uff0c\u5927\u91cf\u6587\u4ef6\u64cd\u4f5c\u53e0\u52a0\u5185\u6838\u63a2\u9488\u540e\uff0cLoongArch \u5e73\u53f0\u7684\u4e00\u5904\u5e95\u5c42\u7f3a\u9677\u88ab\u89e6\u53d1\uff0c\u7cfb\u7edf\u5728\u5b89\u88c5\u6216\u89e3\u538b\u5927\u955c\u50cf\u65f6\u51fa\u73b0\u5361\u6b7b\u60c5\u51b5\u3002deepin \u5f00\u53d1\u4eba\u5458\u56f4\u7ed5\u8fd9\u4e2a\u95ee\u9898\u6301\u7eed\u6392\u67e5\u4e5d\u5929\uff0c\u6700\u7ec8\u5c06\u6839\u56e0\u5b9a\u4f4d\u5230\u00a0LoongArch \u5185\u6838 rethook \u8df3\u677f\u51fd\u6570\u5bf9 percpu \u57fa\u5740\u6062\u590d\u9519\u8bef\uff0c\u5e76\u901a\u8fc7\u9488\u5bf9\u6027\u5b9e\u9a8c\u9a8c\u8bc1\u4e86\u4fee\u590d\u65b9\u5411\u3002<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p data-pm-slice=\"2 2 []\">\u4ee5\u4e0b\u5c31\u662f\u672c\u6b21\u5185\u6838\u95ee\u9898\u53d1\u73b0\u5230\u4fee\u590d\u7684\u5b9e\u8df5\u8fc7\u7a0b\uff0c\u6587\u7ae0\u867d\u957f\uff0c\u4f46\u5e72\u8d27\u6ee1\u6ee1\uff0c\u8bf7\u8010\u5fc3\u9605\u8bfb~<img loading=\"lazy\" class=\"rich_pages wxw-img\" src=\"https:\/\/res.wx.qq.com\/t\/wx_fed\/we-emoji\/res\/assets\/newemoji\/2_06.png\" alt=\"\u56fe\u7247\" width=\"41\" height=\"41\" data-src=\"https:\/\/res.wx.qq.com\/t\/wx_fed\/we-emoji\/res\/assets\/newemoji\/2_06.png#imgIndex=1\" data-ratio=\"1\" data-w=\"128\" data-original-style=\"display: inline-block; font-size: 22px; width: 1em; height: 1em; vertical-align: middle; background-size: 1em; background-repeat: no-repeat; margin-top: -0.2em;\" data-index=\"3\" \/><\/p>\n<p>&nbsp;<\/p>\n<section data-pm-slice=\"0 0 []\">\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<h1><strong>\u5148\u8ba4\u8bc6\u51e0\u4e2a\u6982\u5ff5<\/strong><\/h1>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<ul class=\"list-paddingleft-1\">\n<li>\n<section><strong>LoongArch\uff08\u9f99\u67b6\u6784\uff09\uff1a<\/strong>\u662f\u9f99\u82af\u91c7\u7528\u7684\u5904\u7406\u5668\u6307\u4ee4\u96c6\u67b6\u6784\uff0c\u5185\u6838\u9700\u8981\u9075\u5faa\u8fd9\u5957\u67b6\u6784\u89c4\u5b9a\u7684\u5bc4\u5b58\u5668\u548c\u8fd0\u884c\u7ea6\u5b9a\u3002<\/section>\n<\/li>\n<li>\n<section><strong>percpu \u53d8\u91cf\uff1a<\/strong>\u662f\u6bcf\u4e2a CPU \u6838\u5fc3\u5404\u81ea\u6301\u6709\u4e00\u4efd\u7684\u6570\u636e\u3002\u5185\u6838\u901a\u8fc7\u00a0<code>this_cpu_*()<\/code>\u00a0\u4e00\u7c7b\u64cd\u4f5c\u8bbf\u95ee\u5f53\u524d\u6838\u5fc3\u7684\u6570\u636e\uff0c\u4f8b\u5982\u8c03\u5ea6\u5668\u4e0e RCU \u72b6\u6001\uff0c\u4e5f\u5305\u62ec\u5b9a\u65f6\u5668\u3001FPU \u72b6\u6001\u3002LoongArch \u5185\u6838\u7ea6\u5b9a\u4f7f\u7528\u00a0<code>$r21<\/code>\uff08\u4e5f\u79f0\u00a0<code>$u0<\/code>\uff09\u4fdd\u5b58\u5f53\u524d CPU \u7684 percpu \u57fa\u5740\u3002\u5185\u6838\u6001\u8fd0\u884c\u671f\u95f4\uff0c\u8fd9\u4e2a\u5bc4\u5b58\u5668\u5e94\u59cb\u7ec8\u6307\u5411\u5f53\u524d\u6838\u5fc3\u7684 percpu \u533a\u57df\u3002<\/section>\n<\/li>\n<li>\n<section><strong>kretprobe\uff1a<\/strong>\u662f Linux \u5185\u6838\u7684\u51fd\u6570\u8fd4\u56de\u8ffd\u8e2a\u673a\u5236\uff0c\u53ef\u4ee5\u5728\u88ab\u8ffd\u8e2a\u51fd\u6570\u8fd4\u56de\u65f6\u6267\u884c\u5904\u7406\u903b\u8f91\u3002<\/section>\n<\/li>\n<li>\n<section><strong>rethook\uff1a<\/strong>\u662f\u5185\u6838\u7528\u4e8e\u5b9e\u73b0\u8fd9\u7c7b\u8fd4\u56de\u8ffd\u8e2a\u7684\u673a\u5236\uff0c\u8d1f\u8d23\u5b89\u6392\u56de\u8c03\u5e76\u63a5\u7eed\u539f\u51fd\u6570\u7684\u8fd4\u56de\u6d41\u7a0b\uff0c\u4e3a\u4e86\u6682\u65f6\u63a5\u7ba1\u51fd\u6570\u8fd4\u56de\uff0c\u5185\u6838\u4f1a\u7ecf\u8fc7\u4e00\u5c0f\u6bb5\u6c47\u7f16\u4ee3\u7801\uff0c\u79f0\u4e3a trampoline\uff08\u8df3\u677f\u51fd\u6570\uff09\u3002<\/section>\n<\/li>\n<li>\n<section><strong>\u8fdb\u7a0b\u8fc1\u79fb\uff1a<\/strong>\u5185\u6838\u8c03\u5ea6\u5668\u53ef\u4ee5\u628a\u4e00\u4e2a\u4efb\u52a1\u4ece CPU A \u632a\u5230 CPU B \u4e0a\u7ee7\u7eed\u8dd1\u3002<\/section>\n<\/li>\n<li>\n<section><strong>\u62a2\u5360:<\/strong>\u00a0\u5f53\u524d\u6b63\u5728\u8fd0\u884c\u7684\u4efb\u52a1\u88ab\u66f4\u9ad8\u4f18\u5148\u7ea7\u7684\u6253\u65ad\u3002<\/section>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<section data-pm-slice=\"3 3 []\"><\/section>\n<section data-pm-slice=\"0 0 []\">\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<h1><strong>\u8fd9\u6b21\u95ee\u9898\u662f\u600e\u6837\u53d1\u751f\u7684\uff1f<\/strong><\/h1>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p data-pm-slice=\"0 0 []\">\u8001\u4ee3\u7801\u628a\u903b\u8f91\u62c6\u6210\u4e86\u4e09\u6b65\uff1a<\/p>\n<ol class=\"list-paddingleft-1\">\n<li>\u8fdb\u5165\u8df3\u677f\uff0c\u628a\u00a0<span spellcheck=\"false\"><code>r21<\/code><\/span>\uff08\u5f53\u524d CPU \u7684 percpu \u57fa\u5740\uff09\u538b\u6808\u4fdd\u5b58\uff1b<\/li>\n<li>\u6267\u884c\u00a0<span spellcheck=\"false\"><code>rethook_trampoline_handler()<\/code><\/span>\uff1b<\/li>\n<li>\u9000\u51fa\u8df3\u677f\uff0c\u4ece\u6808\u91cc\u628a\u4fdd\u5b58\u7684\u00a0<span spellcheck=\"false\"><code>r21<\/code><\/span>\u00a0\u6062\u590d\u56de\u5bc4\u5b58\u5668\u3002<\/li>\n<\/ol>\n<p><strong>\u95ee\u9898\u51fa\u5728\u7b2c 2 \u6b65\u3002<\/strong><\/p>\n<p>\u8fd9\u4e2a\u5904\u7406\u51fd\u6570\u91cc\u9762\u5f53\u5b8c\u5168\u62a2\u5360\u6253\u5f00\u65f6\u4efb\u52a1\u6709\u53ef\u80fd\u5728\u8fd9\u671f\u95f4\u88ab\u8c03\u5ea6\u3001\u8fc1\u79fb\u5230\u53e6\u4e00\u4e2a CPU \u4e0a\u8fd0\u884c\u3002<\/p>\n<ul class=\"list-paddingleft-1\">\n<li>\u6bd4\u5982\u4efb\u52a1\u4e00\u5f00\u59cb\u5728 CPU0\uff0c\u8fdb\u5165\u8df3\u677f\uff0c\u628a CPU0 \u7684\u00a0<span spellcheck=\"false\"><code>r21<\/code><\/span>\u00a0\u503c\u5b58\u5230\u6808\u4e0a\uff1b<\/li>\n<li>\u5728\u00a0<span spellcheck=\"false\"><code>rethook_trampoline_handler()<\/code><\/span>\u00a0\u91cc\u7684\u00a0<span spellcheck=\"false\"><code>preempt_enable_notrace()<\/code><\/span>\u00a0\u8c03\u5ea6\u70b9\u53d1\u751f\u8c03\u5ea6\uff0c\u4efb\u52a1\u88ab\u632a\u5230\u6bd4\u5982 CPU1 \u7ee7\u7eed\u8dd1\uff1b<\/li>\n<li>\u4ee3\u7801\u6267\u884c\u5b8c handler\uff0c\u51c6\u5907\u9000\u51fa\u8df3\u677f\uff0c\u4ece\u6808\u91cc\u8bfb\u51fa CPU0 \u7684\u65e7\u00a0<span spellcheck=\"false\"><code>r21<\/code><\/span>\uff0c\u5199\u56de\u5bc4\u5b58\u5668\u3002<\/li>\n<\/ul>\n<p>\u73b0\u5728 CPU1 \u4e0a\u7684\u4efb\u52a1\uff0c<span spellcheck=\"false\"><code>r21<\/code><\/span>\u00a0\u53d8\u6210\u4e86 CPU0 \u7684 percpu \u57fa\u5730\u5740\u3002\u4e4b\u540e\u6240\u6709\u00a0<span spellcheck=\"false\"><code>this_cpu_*()<\/code><\/span>\u00a0\u64cd\u4f5c\uff0c\u672c\u6765\u60f3\u8bbf\u95ee CPU1 \u81ea\u5df1\u7684\u6570\u636e\uff08\u8c03\u5ea6\u961f\u5217\u3001RCU\u3001\u5b9a\u65f6\u5668\u3001FPU \u72b6\u6001\uff09\uff0c\u7ed3\u679c\u5168\u90fd\u8dd1\u53bb\u8bfb\u6539 CPU0 \u7684 percpu \u6570\u636e\u3002<\/p>\n<p><strong>\u4f1a\u5f15\u53d1\u4ec0\u4e48\u6545\u969c\uff1f<\/strong><\/p>\n<ul class=\"list-paddingleft-1\">\n<li>\u5728\u5927\u91cf\u4f7f\u7528 kretprobe\u3001\u7cfb\u7edf\u8d1f\u8f7d\u9ad8\u7684\u65f6\u5019\uff1a<\/li>\n<li>\u8c03\u5ea6\u5668\u6570\u636e\u9519\u4e71\uff0c\u51fa\u73b0\u00a0<span spellcheck=\"false\"><code>scheduling-while-atomic<\/code><\/span>\u00a0\u5d29\u6e83\u62a5\u9519\uff1b<\/li>\n<li>RCU \u62a5\"\u8dd1\u5728\u9519\u8bef CPU \u4e0a\"\u8b66\u544a\uff1b<\/li>\n<li>\u7a7a\u95f2 CPU \u8d1f\u8f7d\u5e73\u8861\u6821\u9a8c\u5931\u8d25\uff08<span spellcheck=\"false\"><code>WARN_ON_ONCE(rq != this_rq())<\/code><\/span>\uff09\uff1b<\/li>\n<li>CPU \u8fdb\u5165\u7a7a\u95f2\u5faa\u73af\u540e\u5b9a\u65f6\u5668\u4e0d\u518d\u91cd\u65b0\u542f\u52a8\uff0cCPU \u786c\u9501\u6b7b\u3002<\/li>\n<\/ul>\n<p>\u590d\u73b0\u573a\u666f\u662f\uff1a\u9f99\u82af 3A6000\uff0c\u5bf9 VFS \u6587\u4ef6\u7cfb\u7edf\u51fd\u6570\u6302\u5927\u91cf kretprobe\uff0c\u540c\u65f6\u75af\u72c2\u8bfb\u5199\u6587\u4ef6\uff0c\u6bd4\u5982\u5b89\u88c5\u7cfb\u7edf\u3001<span spellcheck=\"false\"><code>unsquashfs<\/code><\/span>\u00a0\u89e3\u538b\u5927\u955c\u50cf\uff0c\u751a\u81f3\u7528\u6237\u5b89\u88c5\u8f6f\u4ef6\uff0c\u89e3\u538b\u6587\u4ef6\u65f6\u90fd\u53ef\u4ee5\u89e6\u53d1\u3002<\/p>\n<p>\u8fd9\u4e2a bug \u4ece Linux 6.3 \u7248\u672c\u8001 kretprobe \u65f6\u4ee3\u5c31\u5b58\u5728\uff0c\u6362\u6210 rethook \u4e4b\u540e\u8fd9\u5957\u9519\u8bef\u903b\u8f91\u88ab\u76f4\u63a5\u62f7\u8d1d\u4e86\u8fc7\u6765\u3002<\/p>\n<p>&nbsp;<\/p>\n<section data-pm-slice=\"11 4 []\">\n<section data-pm-slice=\"0 0 []\">\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<h1><strong>\u4e3a\u4ec0\u4e48\u6b64\u524d\u6ca1\u6709\u4eba\u9047\u5230\uff1f<\/strong><\/h1>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p data-pm-slice=\"0 0 []\">\u56e0\u4e3a\u8fd9\u5904\u7f3a\u9677\u8981\u4e09\u4e2a\u6761\u4ef6\u540c\u65f6\u51d1\u9f50\u624d\u4f1a\u51fa\u73b0\uff1a<\/p>\n<ol class=\"list-paddingleft-1\">\n<li>\n<p data-pm-slice=\"0 0 []\">\u7cfb\u7edf\u8dd1\u5728 LoongArch \u4e0a\uff1b<\/p>\n<\/li>\n<li>\n<p data-pm-slice=\"0 0 []\">\u6709\u6a21\u5757\u5728\u5185\u6838\u9ad8\u9891\u8c03\u7528\u7684\u51fd\u6570\u4e0a\u6302\u4e86\u63a2\u9488\uff1b<\/p>\n<\/li>\n<li>\n<p data-pm-slice=\"0 0 []\">\u5185\u6838\u5f00\u7684\u662f\u5b8c\u5168\u62a2\u5360\uff08<span spellcheck=\"false\"><code>preempt=full<\/code><\/span>\uff09\u3002<\/p>\n<\/li>\n<\/ol>\n<p>deepin \u7684\u6587\u4ef6\u7d22\u5f15\u4e3a\u4e86\u5224\u65ad\u6587\u4ef6\u6709\u6ca1\u6709\u88ab\u6539\u52a8\uff0c\u6b63\u597d\u5728\u6587\u4ef6\u76f8\u5173\u88ab\u5bc6\u96c6\u8c03\u7528\u7684\u51fd\u6570\u4e0a\u505a\u4e86\u63d2\u6869\uff1b\u8fd9\u6b21\u51fa\u95ee\u9898\u7684\u7cfb\u7edf\uff0c\u4e3a\u4e86\u8ba9\u754c\u9762\u70b9\u8d77\u6765\u66f4\u8ddf\u624b\uff0c\u4e5f\u5f00\u7740\u5b8c\u5168\u62a2\u5360\u3002\u8fd9\u4e09\u4e2a\u6761\u4ef6\u7f3a\u4e00\u9879\uff0c\u95ee\u9898\u90fd\u4e0d\u4f1a\u53d1\u751f\uff0c\u8fd9\u4e5f\u662f\u5b83\u6b64\u524d\u6ca1\u6709\u51fa\u73b0\u5728\u5176\u4ed6\u4eba\u90a3\u91cc\u7684\u539f\u56e0\u3002<\/p>\n<p>\u76f8\u5bf9\u4e8e\u4e0d\u5f00\u62a2\u5360\uff0c\u684c\u9762\u54cd\u5e94\u4f1a\u66f4\u53ca\u65f6\uff0c\u76f8\u5bf9\u4e8e\u81ea\u613f\u62a2\u5360\uff0c\u5b8c\u5168\u62a2\u5360\u4e0b\u684c\u9762\u54cd\u5e94\u5ef6\u8fdf\u66f4\u4f4e\uff0c\u800c\u4ee3\u4ef7\u662f\u5728\u6027\u80fd\u6d4b\u8bd5\u4e0a\u4f1a\u53d7\u5230\u4e00\u70b9\u5f71\u54cd\u3002\u6b63\u662f\u51fa\u4e8e\u8fd9\u4e2a\u8003\u8651\uff0c\u670d\u52a1\u5668\u548c\u5176\u4ed6\u684c\u9762\u7cfb\u7edf\u7248\u672c\u5982 UOS \u684c\u9762\u7248\u672c\u90fd\u6ca1\u6709\u628a\u62a2\u5360\u5f00\u5230\u5b8c\u5168\u62a2\u5360\u3002<\/p>\n<p>\u8fd9\u4e2a\u95ee\u9898\u4e4b\u524d\u5728 deepin \u4e0a\u6ca1\u6709\u51fa\u73b0\uff0c\u662f\u56e0\u4e3a LoongArch \u67b6\u6784\u4e0a\u6b64\u524d\u5e76\u672a\u9884\u88c5 deepin-anything-dkms \u8fd9\u4e2a\u4f7f\u7528 kretprobe \u63d2\u6869\u7684\u5185\u6838\u6a21\u5757\u5b89\u88c5\u5305\u3002<\/p>\n<p>&nbsp;<\/p>\n<section data-pm-slice=\"3 4 []\">\n<section data-pm-slice=\"11 4 []\">\n<section data-pm-slice=\"0 0 []\">\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<h1><strong>\u62a2\u5360\u6a21\u5f0f\u6709\u54ea\u51e0\u79cd\uff0c\u5dee\u5728\u54ea\u91cc\uff1f<\/strong><\/h1>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p data-pm-slice=\"0 0 []\">\u521a\u624d\u4e0a\u9762\u53cd\u590d\u63d0\u201c<span data-pm-slice=\"1 1 [&quot;para&quot;,{&quot;tagName&quot;:&quot;section&quot;,&quot;attributes&quot;:{&quot;style&quot;:&quot;margin-bottom: 0px;line-height: 1.6em;text-align: justify;&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;,&quot;data-layout-id&quot;:null},&quot;para&quot;,{&quot;tagName&quot;:&quot;section&quot;,&quot;attributes&quot;:{&quot;style&quot;:&quot;margin-bottom: 0px; line-height: 1.6em; text-align: justify;&quot;,&quot;data-pm-slice&quot;:&quot;3 4 []&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;,&quot;data-layout-id&quot;:null},&quot;para&quot;,{&quot;tagName&quot;:&quot;p&quot;,&quot;attributes&quot;:{&quot;cid&quot;:&quot;n56&quot;,&quot;mdtype&quot;:&quot;paragraph&quot;,&quot;class&quot;:&quot;md-end-block md-p&quot;,&quot;style&quot;:&quot;margin-bottom: 8px; line-height: 1.6em;&quot;,&quot;data-pm-slice&quot;:&quot;0 0 []&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;,&quot;data-layout-id&quot;:null},&quot;node&quot;,{&quot;tagName&quot;:&quot;span&quot;,&quot;attributes&quot;:{&quot;md-inline&quot;:&quot;plain&quot;,&quot;class&quot;:&quot;md-plain&quot;,&quot;style&quot;:null},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;}]\">\u62a2\u5360<\/span>\u201d\uff0c\u8fd9\u91cc\u5148\u628a\u5b83\u7684\u51e0\u79cd\u60c5\u51b5\u63b0\u5f00\u63c9\u788e\u8bf4\u4e00\u4e0b \u2014\u2014 \u62a2\u5360\u6a21\u5f0f\u53ef\u4e0d\u662f\u4e00\u4e2a\u5f00\u5173\u53ea\u6709\u5f00\u548c\u5173\u7684\u4e24\u6863\uff0c\u800c\u662f\u51e0\u5957\u4e0d\u540c\u7684\u6a21\u5f0f\uff0c\u8fd9\u4e9b\u6a21\u5f0f\u5728\u7cfb\u7edf\u541e\u5410\u91cf\u4e0e\u54cd\u5e94\u65f6\u95f4\u4e4b\u95f4\u5b9e\u73b0\u4e86\u4e0d\u540c\u7a0b\u5ea6\u7684\u6743\u8861\u3002<\/p>\n<ul>\n<li><strong>\u65e0\u62a2\u5360\uff08<span spellcheck=\"false\"><code>PREEMPT_NONE<\/code><\/span>\u00a0\/\u00a0<span spellcheck=\"false\"><code>preempt=none<\/code><\/span>\uff09<\/strong><\/li>\n<\/ul>\n<p>\u5185\u6838\u53ea\u5728\u4ee3\u7801\u4e3b\u52a8\u8c03\u7528\u00a0<span spellcheck=\"false\"><code>cond_resched()<\/code><\/span>\u00a0\u7684\u5730\u65b9\u624d\u80af\u8ba9\u51fa CPU\u3002<span spellcheck=\"false\"><code>cond_resched()<\/code><\/span>\u00a0\u662f\u5185\u6838\u4ee3\u7801\u91cc\u663e\u5f0f\u5199\u4e0b\u7684\u201c\u8fd9\u91cc\u53ef\u4ee5\u8ba9\u4e00\u4e0b\u201d\u7684\u4f4d\u7f6e\uff0c\u901a\u5e38\u51fa\u73b0\u5728\u5faa\u73af\u3001\u6279\u91cf\u5904\u7406\u8fd9\u7c7b\u957f\u65f6\u95f4\u5e72\u6d3b\u7684\u8def\u5f84\u4e0a\u3002\u9664\u4e86\u8fd9\u4e9b\u70b9\uff0c\u5176\u4ed6\u4f4d\u7f6e\u4e00\u5f8b\u4e0d\u88ab\u6253\u65ad\uff1a\u4e00\u4e2a\u4efb\u52a1\u8fdb\u4e86\u5185\u6838\u6001\uff0c\u5c31\u4f1a\u4e00\u8def\u628a\u8fd9\u6bb5\u6d3b\u513f\u5e72\u5b8c\uff0c\u522b\u7684\u4efb\u52a1\u53ea\u80fd\u7b49\u7740\u3002\u8fd9\u4e48\u505a\u541e\u5410\u6700\u9ad8\uff0c\u56e0\u4e3a\u5207\u6362\u6b21\u6570\u6700\u5c11\uff1b\u4ee3\u4ef7\u662f\u4e00\u65e6\u67d0\u6bb5\u5185\u6838\u64cd\u4f5c\u5f88\u4e45\u90fd\u4e0d\u8ba9\u51fa\uff0c\u54cd\u5e94\u5c31\u4f1a\u88ab\u5361\u4f4f\uff0c\u670d\u52a1\u5668\u548c\u79d1\u5b66\u8ba1\u7b97\u8fd9\u7c7b\u770b\u91cd\u5355\u4f4d\u65f6\u95f4\u5904\u7406\u91cf\u7684\u573a\u666f\u9002\u5408\u5b83\u3002<\/p>\n<ul>\n<li><strong>\u81ea\u613f\u62a2\u5360\uff08<span spellcheck=\"false\"><code>PREEMPT_VOLUNTARY<\/code><\/span>\u00a0\/\u00a0<span spellcheck=\"false\"><code>preempt=voluntary<\/code><\/span>\uff09<\/strong><\/li>\n<\/ul>\n<p>\u5728\u65e0\u62a2\u5360\u7684\u57fa\u7840\u4e0a\u518d\u653e\u5bbd\u4e00\u6863\uff0c\u628a\u00a0<span spellcheck=\"false\"><code>might_sleep()<\/code><\/span>\u00a0\u8fd9\u7c7b\u201c\u8fd9\u91cc\u53ef\u80fd\u4f1a\u7761\u201d\u7684\u4f4d\u7f6e\u4e5f\u7b97\u6210\u8c03\u5ea6\u70b9\u3002\u5185\u6838\u4ee3\u7801\u4e00\u65e6\u8d70\u8fdb\u53ef\u80fd\u7761\u7720\u7684\u8def\u5f84\uff0c\u6bd4\u5982\u7b49\u4e00\u4e2a\u9501\u3001\u7b49 I\/O\uff0c\u8c03\u5ea6\u5668\u5c31\u6709\u673a\u4f1a\u63d2\u8fdb\u6765\u628a CPU \u4ea4\u7ed9\u522b\u4eba\u3002\u5b83\u7684\u601d\u8def\u662f\uff1a\u4e00\u6bb5\u4ee3\u7801\u65e2\u7136\u672c\u6765\u5c31\u53ef\u80fd\u7761\u7740\uff0c\u90a3\u8ba9\u5b83\u5728\u8fd9\u513f\u88ab\u6253\u65ad\u4e5f\u6ca1\u4ec0\u4e48\u989d\u5916\u635f\u5931\u3002\u6240\u4ee5\u5b83\u5728\u4e0d\u6539\u52a8\u201c\u4e0d\u8ba9\u51fa\u4e0d\u6253\u65ad\u201d\u8fd9\u6761\u5e95\u7ebf\u7684\u524d\u63d0\u4e0b\uff0c\u628a\u54cd\u5e94\u7684\u77ed\u677f\u8865\u6389\u4e86\u4e00\u90e8\u5206\u3002\u65e5\u5e38\u4f7f\u7528\u4e2d\u5b83\u548c\u5b8c\u5168\u62a2\u5360\u7684\u5dee\u522b\u5e76\u4e0d\u663e\u773c\u3002<\/p>\n<ul>\n<li><strong>\u5b8c\u5168\u62a2\u5360\uff08<span spellcheck=\"false\"><code>PREEMPT<\/code><\/span>\u00a0\/\u00a0<span spellcheck=\"false\"><code>preempt=full<\/code><\/span>\uff09<\/strong><\/li>\n<\/ul>\n<p>\u4e0d\u518d\u7b49\u4ee3\u7801\u81ea\u5df1\u8ba9\u51fa\uff0c\u53ea\u8981\u5185\u6838\u6ca1\u6709\u660e\u786e\u628a\u81ea\u5df1\u201c<span data-pm-slice=\"1 1 [&quot;para&quot;,{&quot;tagName&quot;:&quot;section&quot;,&quot;attributes&quot;:{&quot;style&quot;:&quot;margin-bottom: 0px;line-height: 1.6em;text-align: justify;&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;,&quot;data-layout-id&quot;:null},&quot;para&quot;,{&quot;tagName&quot;:&quot;section&quot;,&quot;attributes&quot;:{&quot;style&quot;:&quot;margin-bottom: 0px;line-height: 1.6em;text-align: justify;&quot;,&quot;data-pm-slice&quot;:&quot;3 4 []&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;,&quot;data-layout-id&quot;:null},&quot;list&quot;,{&quot;type&quot;:&quot;ul&quot;,&quot;style&quot;:&quot;list-style-type: disc;&quot;,&quot;class&quot;:&quot;list-paddingleft-1&quot;,&quot;start&quot;:null,&quot;data-layout-id&quot;:null},&quot;listitem&quot;,{&quot;style&quot;:&quot;&quot;},&quot;para&quot;,{&quot;tagName&quot;:&quot;p&quot;,&quot;attributes&quot;:{&quot;cid&quot;:&quot;n59&quot;,&quot;mdtype&quot;:&quot;paragraph&quot;,&quot;style&quot;:&quot;margin-bottom: 8px;line-height: 1.6em;text-align: left;&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;,&quot;data-layout-id&quot;:null},&quot;node&quot;,{&quot;tagName&quot;:&quot;span&quot;,&quot;attributes&quot;:{&quot;md-inline&quot;:&quot;plain&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;}]\">\u9501\u4f4f\u201d<\/span>\uff0c\u4efb\u4f55\u4f4d\u7f6e\u90fd\u80fd\u7acb\u523b\u88ab\u6253\u65ad\u3002\u54ea\u6015\u6b63\u5728\u5904\u7406\u7cfb\u7edf\u8c03\u7528\u3001\u6b63\u5728\u8dd1\u9a71\u52a8\u4ee3\u7801\uff0c\u53ea\u8981\u6709\u66f4\u7d27\u6025\u7684\u4efb\u52a1\u6765\u4e86\uff0c\u8c03\u5ea6\u5668\u5c31\u80fd\u5207\u8fc7\u53bb\u3002\u684c\u9762\u4e0a\u70b9\u4e00\u4e0b\u3001\u62d6\u4e00\u4e0b\u4e4b\u6240\u4ee5\u8ddf\u624b\uff0c\u9760\u7684\u5c31\u662f\u5b83\u3002\u4ee3\u4ef7\u662f\u5185\u6838\u91cc\u968f\u5904\u53ef\u89c1\u7684\u5207\u6362\u70b9\uff0c\u541e\u5410\u4f1a\u6389\u4e00\u4e9b\uff0c\u9501\u7684\u7ade\u4e89\u4e5f\u66f4\u590d\u6742\u3002<\/p>\n<ul>\n<li><strong>\u5ef6\u8fdf\u62a2\u5360\uff08<span spellcheck=\"false\"><code>PREEMPT_LAZY<\/code><\/span>\u00a0\/\u00a0<span spellcheck=\"false\"><code>preempt=lazy<\/code><\/span>\uff09<\/strong><\/li>\n<\/ul>\n<p>\u5728\u5b8c\u5168\u62a2\u5360\u6a21\u578b\u4e0b\uff0c\u5185\u6838\u901a\u8fc7\u5728\u591a\u4e2a\u8282\u70b9\u68c0\u67e5\u00a0<span spellcheck=\"false\"><code>need_resched\/TIF_NEED_RESCHED\u00a0<\/code><\/span>\u5e76\u89e6\u53d1\u4efb\u52a1\u62a2\u5360\uff0c\u6bd4\u5982\u65f6\u949f\u6ef4\u7b54\u4e8b\u4ef6(\u6bd4\u5982HZ=1000\u5c31\u6bcf\u79d2\u949f\u89e6\u53d11000\u6b21)\u7b49\u3002\u5ef6\u8fdf\u62a2\u5360\u65b0\u589e\u4e86\u4e00\u4e2a<span spellcheck=\"false\"><code>TIF_NEED_RESCHED_LAZY<\/code><\/span>\uff0c\u7528\u4e8e\u6807\u8bb0\u9700\u8981\u5728\u67d0\u4e2a\u65f6\u95f4\u70b9\u91cd\u65b0\u8c03\u5ea6\uff0c\u4f46\u4e0d\u5fc5\u7acb\u5373\u6267\u884c\u3002<span spellcheck=\"false\"><code>PREEMPT_LAZY<\/code><\/span>\u4ecb\u4e8e\u00a0<span spellcheck=\"false\"><code>PREEMPT\u00a0<\/code><\/span>\u548c\u00a0<span spellcheck=\"false\"><code>PREEMPT_VOLUNTARY\u00a0<\/code><\/span>\u4e4b\u95f4\uff0c\u610f\u56fe\u662f\u5728\u4e0d\u5f71\u54cd\u5b9e\u65f6\u4efb\u52a1\u54cd\u5e94\u65f6\u95f4\u7684\u524d\u63d0\u4e0b\uff0c\u6062\u590d\u541e\u5410\u91cf\u5bfc\u5411\u4efb\u52a1\u7684\u6027\u80fd\u635f\u5931\uff0c\u5728v7.0\u5185\u6838\u7248\u672c\u4e4b\u540e\u53ea\u6709\u00a0<span spellcheck=\"false\"><code>PREEMPT_LAZY\u00a0<\/code><\/span>\u548c\u00a0<span spellcheck=\"false\"><code>PREEMPT\u00a0<\/code><\/span>\u4e24\u79cd\u53ef\u9009\u3002<\/p>\n<ul>\n<li><strong>\u5b9e\u65f6\u62a2\u5360\uff08<span spellcheck=\"false\"><code>PREEMPT_RT<\/code><\/span>\uff09<\/strong><\/li>\n<\/ul>\n<p>\u5728\u5b9e\u65f6\u62a2\u5360\u4e0b\uff0c\u5185\u6838\u88ab\u6539\u9020\u83b7\u5f97\u51e0\u4e4e\u786c\u5b9e\u65f6\u7684\u80fd\u529b\uff0c\u5b8c\u5168\u53ef\u62a2\u5360\uff0c\u4e2d\u65ad\u7ebf\u7a0b\u5316\uff0c\u9501\u53ef\u62a2\u5360\u4e14\u652f\u6301\u4f18\u5148\u7ea7\u7ee7\u627f\uff0c\u8ffd\u6c42\u4f4e\u5ef6\u8fdf\u548c\u786e\u5b9a\u6027\u3002<\/p>\n<p><strong>\u800c\u8fd9\u6b21\u7684\u7f3a\u9677\u662f\u5728\u5b8c\u5168\u62a2\u5360\u4e0b\u53d1\u4f5c\u7684\u3002<\/strong>\u00a0\u8df3\u677f\u51fd\u6570\u6267\u884c\u65f6\u4f1a\u77ed\u6682\u5730\u5173\u6389\u62a2\u5360\uff0c\u5904\u7406\u5b8c\u6210\u518d\u6253\u5f00\u3002\u5728\u5b8c\u5168\u62a2\u5360\u4e0b\uff0c\u8fd9\u4e2a\u201c<span data-pm-slice=\"1 1 [&quot;para&quot;,{&quot;tagName&quot;:&quot;section&quot;,&quot;attributes&quot;:{&quot;style&quot;:&quot;margin-bottom: 0px;line-height: 1.6em;text-align: justify;&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;,&quot;data-layout-id&quot;:null},&quot;para&quot;,{&quot;tagName&quot;:&quot;section&quot;,&quot;attributes&quot;:{&quot;style&quot;:&quot;margin-bottom: 0px;line-height: 1.6em;text-align: justify;&quot;,&quot;data-pm-slice&quot;:&quot;3 4 []&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;,&quot;data-layout-id&quot;:null},&quot;para&quot;,{&quot;tagName&quot;:&quot;p&quot;,&quot;attributes&quot;:{&quot;cid&quot;:&quot;n62&quot;,&quot;mdtype&quot;:&quot;paragraph&quot;,&quot;style&quot;:&quot;margin-bottom: 8px;line-height: 1.6em;text-align: left;&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;,&quot;data-layout-id&quot;:null},&quot;node&quot;,{&quot;tagName&quot;:&quot;span&quot;,&quot;attributes&quot;:{&quot;md-inline&quot;:&quot;plain&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;}]\">\u6253\u5f00<\/span>\u201d\u7684\u77ac\u95f4\u5c31\u662f\u4e00\u4e2a\u771f\u6b63\u7684\u8c03\u5ea6\u70b9\uff0c\u4efb\u52a1\u53ef\u80fd\u5c31\u5728\u8fd9\u91cc\u88ab\u6362\u5230\u53e6\u4e00\u9897 CPU \u4e0a\uff1b\u5728\u65e0\u62a2\u5360\u548c\u81ea\u613f\u62a2\u5360\u4e0b\uff0c\u8fd9\u4e00\u6b65\u53ea\u662f\u628a\u8ba1\u6570\u51cf\u56de\u53bb\uff0c\u8c03\u5ea6\u5668\u4e0d\u4f1a\u5728\u90a3\u4e2a\u7a97\u53e3\u91cc\u4ecb\u5165\uff0c\u4efb\u52a1\u4e0d\u4f1a\u5728\u90a3\u513f\u6362 CPU\uff0c\u4e5f\u5c31\u8e29\u4e0d\u5230\u540e\u9762\u90a3\u4e2a\u6062\u590d\u65e7\u57fa\u5740\u7684\u9519\u8bef\uff0c\u5ef6\u8fdf\u62a2\u5360\u4ece\u4ee3\u7801\u4e0a\u770b\u4e5f\u4f1a\u89e6\u53d1\u7f3a\u9677\uff0c\u53ea\u662f\u5c1a\u672a\u5b9e\u9a8c\u3002<\/p>\n<p>\u4ece\u8fd9\u4e2a\u5dee\u522b\u4e5f\u80fd\u770b\u51fa\u964d\u7ea7\u5230\u81ea\u613f\u62a2\u5360\u4e3a\u4ec0\u4e48\u80fd\u5e94\u6025\uff0c\u56e0\u4e3a\u5b83\u5e76\u4e0d\u4fee\u6389\u8df3\u677f\u91cc\u7684\u90a3\u4e24\u884c\uff0c\u53ea\u662f\u8ba9\u89e6\u53d1\u8def\u5f84\u8d70\u4e0d\u901a\u3002<\/p>\n<\/section>\n<p>&nbsp;<\/p>\n<section data-pm-slice=\"11 4 []\">\n<section data-pm-slice=\"0 0 []\">\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<h1><strong>PREEMPT_DYNAMIC<\/strong><strong>\u7f16\u8bd1\u65f6\u5b9a\u7684\u4e8b\uff0c\u53ef\u4ee5\u5f00\u673a\u518d\u5b9a<\/strong><\/h1>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section data-pm-slice=\"11 4 []\">\n<p data-pm-slice=\"0 0 []\">\u4ee5\u524d\u62a2\u5360\u6a21\u5f0f\u662f\u5728\u7f16\u8bd1\u5185\u6838\u65f6\u5c31\u5b9a\u6b7b\u7684\uff0c\u60f3\u6362\u4e00\u79cd\u5c31\u5f97\u91cd\u65b0\u7f16\u8bd1\u3001\u91cd\u65b0\u53d1\u5e03\u4e00\u5957\u5185\u6838\uff0c\u53d1\u884c\u7248\u8981\u7ed9\u670d\u52a1\u5668\u3001\u684c\u9762\u3001\u4f4e\u5ef6\u8fdf\u684c\u9762\u5404\u51c6\u5907\u4e00\u5957\u4e8c\u8fdb\u5236\u7a0b\u5e8f\uff0c\u7ef4\u62a4\u6210\u672c\u9ad8\u3002<\/p>\n<p>Linux 5.12 \u5f15\u5165\u7684 PREEMPT_DYNAMIC \u89e3\u5f00\u4e86\u8fd9\u4e2a\u9650\u5236\uff1a\u5185\u6838\u7f16\u8bd1\u65f6\u4ecd\u7136\u58f0\u660e\u4e00\u4e2a\u9ed8\u8ba4\u6a21\u5f0f\uff0c\u4f46\u53ea\u8981\u542f\u7528\u4e86\u8fd9\u4e2a\u9009\u9879\uff0c\u5f00\u673a\u65f6\u7528\u542f\u52a8\u53c2\u6570 preempt= \u5c31\u80fd\u6539\u6389\u5b83\uff0c\u505a\u6cd5\u662f\u63d0\u524d\u5728\u5185\u6838\u91cc\u7559\u597d\u4e00\u6279\u5f00\u5173\uff0c\u5f00\u673a\u65f6\u6309\u53c2\u6570\u628a\u5b83\u4eec\u6328\u4e2a\u62e8\u5230\u5bf9\u5e94\u4f4d\u7f6e\u3002<\/p>\n<p>deepin \u684c\u9762\u7248\u628a\u9ed8\u8ba4\u503c\u5b9a\u5728\u5b8c\u5168\u62a2\u5360\uff0c\u4e3a\u7684\u662f\u8ba9\u684c\u9762\u4e0a\u7684\u4e00\u6b21\u70b9\u51fb\u6216\u62d6\u62fd\u5c3d\u5feb\u5f97\u5230\u54cd\u5e94\uff0c \u7f16\u8bd1\u914d\u7f6e\u91cc\u7684 CONFIG_PREEMPT=y \u548c CONFIG_PREEMPT_DYNAMIC=y \u5b9a\u4e86\u8fd9\u4e2a\u9ed8\u8ba4\u503c\uff0c\u65f6\u949f\u9891\u7387 HZ=1000 \u8ba9\u5185\u6838\u6bcf\u6beb\u79d2\u6709\u4e00\u6b21\u65f6\u949f\u4e2d\u65ad\uff0c\u5b8c\u5168\u62a2\u5360\u548c\u81ea\u613f\u62a2\u5360\u5728\u65e5\u5e38\u4f7f\u7528\u4e2d\u7684\u5dee\u522b\u5176\u5b9e\u6ca1\u90a3\u4e48\u663e\u773c\uff0c\u6362\u6765\u7684\u662f\u66f4\u7a33\u7684\u54cd\u5e94\u3002<\/p>\n<p>\u5185\u6838\u542f\u52a8\u65f6\u4f1a\u628a\u751f\u6548\u7684\u6a21\u5f0f\u6253\u8fdb\u65e5\u5fd7\uff0c\u5f62\u5982 Dynamic Preempt: full\uff0c\u9009\u4e86\u54ea\u4e00\u6863\uff0c\u5f00\u673a\u770b\u4e00\u773c\u65e5\u5fd7\u5c31\u77e5\u9053\u3002<\/p>\n<div class=\"su-table su-table-alternate\">\n<figure data-pm-slice=\"0 0 []\">\n<table>\n<thead>\n<tr>\n<th data-colwidth=\"96\">\u5185\u6838<\/th>\n<th data-colwidth=\"89\">\u62a2\u5360\u6a21\u5f0f<\/th>\n<th data-colwidth=\"131\">\u600e\u4e48\u5b9a\u7684<\/th>\n<th data-colwidth=\"94\">\u4f1a\u4e0d\u4f1a\u9047\u5230\u8fd9\u4e2a\u7f3a\u9677<\/th>\n<th data-colwidth=\"92\">\u80fd\u4e0d\u80fd\u7528\u542f\u52a8\u53c2\u6570\u7ed5\u5f00<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td data-colwidth=\"96\">deepin \u684c\u9762<\/td>\n<td data-colwidth=\"89\">\u5b8c\u5168\u62a2\u5360<\/td>\n<td data-colwidth=\"131\">\u7f16\u8bd1\u65f6\u5b9a\u9ed8\u8ba4\u503c\uff0c\u53ef\u5f00\u673a\u8c03\u6574<\/td>\n<td data-colwidth=\"94\">\u4f1a<\/td>\n<td data-colwidth=\"92\">\u80fd<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"96\">UOS \u684c\u9762<\/td>\n<td data-colwidth=\"89\">\u81ea\u613f\u62a2\u5360<\/td>\n<td data-colwidth=\"131\">\u7f16\u8bd1\u65f6\u5b9a\u6b7b<\/td>\n<td data-colwidth=\"94\">\u4e0d\u4f1a<\/td>\n<td data-colwidth=\"92\">\u7528\u4e0d\u4e0a<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"96\">\u670d\u52a1\u5668<\/td>\n<td data-colwidth=\"89\">\u81ea\u613f\u62a2\u5360<\/td>\n<td data-colwidth=\"131\">\u7f16\u8bd1\u65f6\u5b9a\u6b7b\u6216\u53ef\u8c03<\/td>\n<td data-colwidth=\"94\">\u4e0d\u4f1a<\/td>\n<td data-colwidth=\"92\">\u89c6\u5185\u6838\u800c\u5b9a<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<\/div>\n<blockquote><p>deepin \u684c\u9762\u628a\u9ed8\u8ba4\u503c\u5b9a\u5728\u5b8c\u5168\u62a2\u5360\u3002\u7f16\u8bd1\u65f6\u58f0\u660e\u5b8c\u5168\u62a2\u5360\u4e3a\u9ed8\u8ba4\uff0c\u9700\u8981\u65f6\u8fd8\u80fd\u7528\u542f\u52a8\u53c2\u6570\u8c03\u6574\uff0c\u8fd9\u6837\u684c\u9762\u54cd\u5e94\u6700\u5feb\uff0c\u9047\u5230\u8fd9\u6b21\u8fd9\u7c7b\u53ea\u5728\u5b8c\u5168\u62a2\u5360\u4e0b\u53d1\u4f5c\u7684\u95ee\u9898\uff0c\u4e5f\u80fd\u4e34\u65f6\u628a\u53c2\u6570\u6539\u6210 preempt=voluntary \u628a\u89e6\u53d1\u8def\u5f84\u5835\u4f4f\uff0c\u4e0d\u5fc5\u7b49\u5b8c\u6574\u7684\u5185\u6838\u66f4\u65b0\u8d70\u5b8c\u6d41\u7a0b\u3002<\/p>\n<p>UOS \u684c\u9762\u7f16\u8bd1\u65f6\u5b9a\u6210\u81ea\u613f\u62a2\u5360\u3002\u7406\u7531\u6709\u4e24\u5c42\uff1a\u81ea\u613f\u62a2\u5360\u548c\u5b8c\u5168\u62a2\u5360\u5728\u65e5\u5e38\u4f7f\u7528\u4e2d\u7684\u5dee\u522b\u672c\u5c31\u4e0d\u660e\u663e\uff1b\u653e\u5f03\u8fd9\u5957\u673a\u5236\u80fd\u7701\u6389\u6539\u5199\u7684\u5f00\u9500\uff0c\u4e5f\u8ba9\u5185\u6838\u7ed3\u6784\u66f4\u7b80\u5355\uff0c\u4ee3\u4ef7\u662f\u62a2\u5360\u6a21\u5f0f\u4ece\u6b64\u6539\u4e0d\u52a8\uff0c\u60f3\u6362\u4e00\u79cd\u53ea\u80fd\u91cd\u65b0\u7f16\u8bd1\u4e00\u5957\u5185\u6838\u3002<\/p><\/blockquote>\n<section><img loading=\"lazy\" class=\"alignnone size-full wp-image-40289\" src=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2026\/10\/\u56fe\u72471.png\" alt=\"\" width=\"1639\" height=\"1383\" srcset=\"https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/\u56fe\u72471.png 1639w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/\u56fe\u72471-300x253.png 300w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/\u56fe\u72471-1024x864.png 1024w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/\u56fe\u72471-150x127.png 150w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/\u56fe\u72471-768x648.png 768w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/\u56fe\u72471-1536x1296.png 1536w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/\u56fe\u72471-24x20.png 24w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/\u56fe\u72471-36x30.png 36w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/\u56fe\u72471-48x41.png 48w\" sizes=\"(max-width: 1639px) 100vw, 1639px\" \/><\/section>\n<p>&nbsp;<\/p>\n<section data-pm-slice=\"3 3 []\">\n<section><\/section>\n<section data-pm-slice=\"11 4 []\">\n<section data-pm-slice=\"0 0 []\">\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<h1><strong>deepin \u6587\u4ef6\u7d22\u5f15\u5982\u4f55\u66b4\u9732\u4e86\u7f3a\u9677<\/strong><\/h1>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p>\u6700\u521d\uff0c\u6545\u969c\u51fa\u73b0\u5728 deepin LoongArch \u65e5\u6784\u5efa\u955c\u50cf\u7684\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u3002\u88c5\u7cfb\u7edf\u65f6\uff0c\u5728\u5b89\u88c5\u7a0b\u5e8f\u4f7f\u7528 unsquashfs \u89e3\u538b\u955c\u50cf\uff0c\u8bbe\u5907\u4f1a\u7a81\u7136\u5361\u6b7b\uff0c\u7531\u4e8e\u4e32\u53e3\u8f93\u51fa\u6709\u9650\uff0c\u521d\u671f\u65e5\u5fd7\u53ea\u663e\u793a SLUB\u3001\u8c03\u5ea6\u5668\u548c\u62a2\u5360\u76f8\u5173\u5f02\u5e38\uff0c\u6211\u4eec\u65e0\u6cd5\u76f4\u63a5\u627e\u51fa\u6839\u56e0\u3002<\/p>\n<p>\u6392\u67e5\u4eba\u5458\u4e00\u5ea6\u6000\u7591\u955c\u50cf\u4e2d\u65b0\u52a0\u5165\u7684 deepin-anything-dkms \u6a21\u5757\u3002\u8fd9\u4e2a\u6a21\u5757\u4e0e\u6587\u4ef6\u7d22\u5f15\u6709\u5173\uff0c\u4f7f\u7528 VFS kretprobe hook \u8ffd\u8e2a\u6587\u4ef6\u64cd\u4f5c\uff0c\u56e0\u6b64\u6210\u4e3a\u91cd\u8981\u7ebf\u7d22\u3002\u540e\u7eed\u5b9e\u9a8c\u5c06\u6839\u56e0\u6307\u5411 LoongArch \u5185\u6838\u7684\u63a2\u9488\u8fd4\u56de\u8def\u5f84\u3002\u6a21\u5757\u53ca\u9ad8\u5f3a\u5ea6\u6587\u4ef6\u8bbf\u95ee\u8ba9\u8fd9\u5904\u5185\u6838\u7f3a\u9677\u66f4\u5bb9\u6613\u663e\u73b0\u3002<\/p>\n<p>\u4e3a\u4e86\u51cf\u5c11\u53cd\u590d\u5236\u4f5c\u955c\u50cf\u548c\u5237\u673a\u7684\u65f6\u95f4\uff0c\u5f00\u53d1\u4eba\u5458\u628a\u590d\u73b0\u8fc7\u7a0b\u7f29\u5c0f\u5230\u5b89\u88c5\u540e\u7684 unsquashfs \u591a\u8f6e\u6d4b\u8bd5\uff0c\u5e76\u4f7f\u7528 netconsole \u7f51\u7edc\u63a7\u5236\u53f0\u65e5\u5fd7\u66ff\u4ee3\u7269\u7406\u63a5\u5165\u4e32\u53e3\u63a7\u5236\u53f0\uff0cAI \u534f\u52a9\u5206\u6790\u5f02\u5e38\u3001\u7f16\u5199\u8bca\u65ad\u8865\u4e01\u548c\u6574\u7406\u9a8c\u8bc1\u601d\u8def\uff0c\u6bcf\u4e2a\u7ed3\u8bba\u4ecd\u901a\u8fc7\u5b9e\u9645\u8bbe\u5907\u4e0a\u7684\u5bf9\u7167\u5b9e\u9a8c\u786e\u8ba4\u3002<\/p>\n<p>\u8fde\u7eed\u591a\u8f6e\u5b9e\u9a8c\u9010\u6e10\u628a\u8303\u56f4\u7f29\u5230 rethook \u8df3\u677f\u51fd\u6570\u3001\u62a2\u5360\u4e0e\u4efb\u52a1\u8fc1\u79fb\u7684\u4ea4\u4e92\uff0c\u8c03\u8bd5\u8865\u4e01\u4e5f\u8ba9\u95ee\u9898\u4ece\"\u5b89\u88c5\u65f6\u5076\u53d1\u5361\u6b7b\"\u53d8\u6210\u53ef\u91cd\u590d\u9a8c\u8bc1\u7684\u5185\u6838\u6545\u969c\u3002\u6700\u7ec8\u628a\u4efb\u52a1\u8fc1\u79fb\u671f\u95f4\u7684 percpu \u57fa\u5740\u5f02\u5e38\uff0c\u548c\u8c03\u5ea6\u3001RCU \u4e0e\u5b9a\u65f6\u5668\u4e0a\u7684\u591a\u79cd\u75c7\u72b6\u5bf9\u5e94\u4e86\u8d77\u6765\u3002<\/p>\n<p>&nbsp;<\/p>\n<section>\n<section data-pm-slice=\"11 4 []\">\n<section data-pm-slice=\"3 3 [&quot;para&quot;,{&quot;tagName&quot;:&quot;section&quot;,&quot;attributes&quot;:{&quot;style&quot;:&quot;margin-bottom: 0px;line-height: 1.6em;text-align: justify;&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;,&quot;data-layout-id&quot;:null},&quot;para&quot;,{&quot;tagName&quot;:&quot;section&quot;,&quot;attributes&quot;:{&quot;data-pm-slice&quot;:&quot;11 4 []&quot;,&quot;style&quot;:&quot;margin-bottom:0px;&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;,&quot;data-layout-id&quot;:null}]\">\n<section data-pm-slice=\"11 4 []\">\n<section data-pm-slice=\"0 0 []\">\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<h1><strong>\u7f3a\u9677\u4efb\u52a1\u6362\u4e86 CPU\uff0c<\/strong><strong>\u5bc4\u5b58\u5668\u4e3a\u4ec0\u4e48\u4e0d\u7528\u8fd8\u539f\uff1f<\/strong><\/h1>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p>LoongArch \u5185\u6838\u5df2\u6709\u660e\u786e\u7ea6\u5b9a\uff1a\u5185\u6838\u6001\u6267\u884c\u65f6\uff0c$r21 \u4fdd\u6301\u4e3a\u5f53\u524d CPU \u7684 percpu \u57fa\u5740\uff1b\u4ece\u7528\u6237\u6001\u8fdb\u5165\u5185\u6838\u65f6\uff0c\u5f02\u5e38\u5165\u53e3\u4f1a\u6309\u67b6\u6784\u89c4\u5219\u52a0\u8f7d\u76f8\u5e94\u57fa\u5740\u3002\u666e\u901a\u5185\u6838\u4e0a\u4e0b\u6587\u5207\u6362\u8ba9\u4efb\u52a1\u8fc1\u79fb\u5230\u53e6\u4e00\u9897 CPU \u540e\uff0c\u5f53\u524d CPU \u7684\u5bc4\u5b58\u5668\u73af\u5883\u4e5f\u5e94\u4f7f\u7528\u65b0\u6838\u5fc3\u7684 percpu \u57fa\u5740\u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u4efb\u52a1\u8fc1\u79fb\u540e\u56de\u5230\u8df3\u677f\u51fa\u53e3\u65f6\uff0c\u5bc4\u5b58\u5668\u4e2d\u7684 $r21 \u5df2\u5bf9\u5e94\u5f53\u524d\u6838\u5fc3\u3002\u8df3\u677f\u518d\u628a\u6808\u91cc\u4fdd\u5b58\u7684\u65e7\u503c\u5199\u56de\u53bb\uff0c\u53cd\u800c\u4f1a\u8986\u76d6\u6b63\u786e\u503c\uff0c\u4fee\u590d\u65b9\u5411\u662f\u5728 rethook \u8df3\u677f\u4e2d\u5220\u9664\u4fdd\u5b58\u548c\u6062\u590d $r21 \u7684\u64cd\u4f5c\u3002\u5220\u9664\u6062\u590d\u64cd\u4f5c\u8db3\u4ee5\u907f\u514d\u8986\u76d6\u65b0\u6838\u5fc3\u7684\u57fa\u5740\uff1b\u540c\u65f6\u5220\u9664\u4fdd\u5b58\u64cd\u4f5c\uff0c\u4e5f\u80fd\u53bb\u6389\u4e0d\u518d\u9700\u8981\u7684\u6808\u7a7a\u95f4\u3002<\/p>\n<p>\u9f99\u67b6\u6784 kretprobe \u7684\u8df3\u677f\u6c47\u7f16\u9519\u8bef\u5730\u4fdd\u5b58\u4e86 percpu \u57fa\u5740\u5bc4\u5b58\u5668\u3002\u5982\u679c\u4efb\u52a1\u5728\u8df3\u677f\u5904\u7406\u671f\u95f4\u88ab\u8c03\u5ea6\u8fc1\u79fb\u5230\u522b\u7684 CPU\uff0c\u9000\u51fa\u65f6\u6062\u590d\u65e7 CPU \u7684\u57fa\u5740\uff0c\u4f1a\u5bfc\u81f4\u540e\u7eed\u4ee3\u7801\u8bbf\u95ee\u9519 CPU \u7684\u79c1\u6709\u6570\u636e\uff0c\u5f15\u53d1\u8c03\u5ea6\u5f02\u5e38\u3001\u5b9a\u65f6\u5668\u5361\u6b7b\u3002\u6309\u5185\u6838\u7ea6\u5b9a\uff0c\u5185\u6838\u6001\u4e0b\u8be5\u5bc4\u5b58\u5668\u59cb\u7ec8\u4fdd\u6301\u6b63\u786e\u503c\uff0c\u8df3\u677f\u4e0d\u9700\u8981\u624b\u52a8\u4fdd\u5b58\u6062\u590d\uff0c\u5220\u6389\u8fd9\u4e24\u884c\u6c47\u7f16\u5c31\u4fee\u590d\u4e86\u3002<\/p>\n<p>&nbsp;<\/p>\n<section data-pm-slice=\"11 4 []\">\n<section data-pm-slice=\"3 6 [&quot;para&quot;,{&quot;tagName&quot;:&quot;section&quot;,&quot;attributes&quot;:{&quot;style&quot;:&quot;margin-bottom: 0px;line-height: 1.6em;text-align: justify;&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;,&quot;data-layout-id&quot;:null},&quot;para&quot;,{&quot;tagName&quot;:&quot;section&quot;,&quot;attributes&quot;:{&quot;data-pm-slice&quot;:&quot;11 4 []&quot;,&quot;style&quot;:&quot;margin-bottom:0px;&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;,&quot;data-layout-id&quot;:null}]\">\n<section>\n<section data-pm-slice=\"11 4 []\">\n<section data-pm-slice=\"3 3 [&quot;para&quot;,{&quot;tagName&quot;:&quot;section&quot;,&quot;attributes&quot;:{&quot;style&quot;:&quot;margin-bottom: 0px;line-height: 1.6em;text-align: justify;&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;,&quot;data-layout-id&quot;:null},&quot;para&quot;,{&quot;tagName&quot;:&quot;section&quot;,&quot;attributes&quot;:{&quot;data-pm-slice&quot;:&quot;11 4 []&quot;,&quot;style&quot;:&quot;margin-bottom:0px;&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;,&quot;data-layout-id&quot;:null}]\">\n<section data-pm-slice=\"11 4 []\">\n<section data-pm-slice=\"0 0 []\">\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<h1><strong>\u9a8c\u8bc1\u6839\u56e0\uff0c\u800c\u4e0d\u6b62\u8ba9\u6545\u969c\u6d88\u5931<\/strong><\/h1>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p>\u8fd9\u6b21\u95ee\u9898\u7684\u6392\u67e5\u7ecf\u5386\u4e86\u591a\u8f6e\u5047\u8bbe\u548c\u53cd\u590d\u9a8c\u8bc1\uff0c\u6700\u5f00\u59cb\u8ba4\u4e3a\u662f\u4e00\u4e2a\u8fd1\u671f\u5f15\u5165\u7684\u95ee\u9898\uff0c\u68c0\u67e5 CPU \u8c03\u9891\u548c USB \u81ea\u52a8\u6302\u8d77\uff0c\u4e5f\u5c1d\u8bd5\u4e8c\u5206\u5185\u6838\u63d0\u4ea4\u548c\u6a21\u5757\u5f71\u54cd\uff0c\u8fd8\u5c1d\u8bd5\u4e8c\u5206\u5185\u6838\u63d0\u4ea4\u548c\u6a21\u5757\u5f71\u54cd\uff0c\u5e76\u5c1d\u8bd5\u4e0d\u540c\u5185\u6838\u7248\u672c\uff0c\u6700\u540e\u53d1\u73b0\u539f\u7248\u5185\u6838\u4e5f\u80fd\u590d\u73b0\u540e\u8ba4\u4e3a\u8fd9\u4e2a\u662f\u4e00\u4e2a\u4e0a\u6e38\u95ee\u9898\u3002<\/p>\n<p>\u8c03\u8bd5\u7684\u96be\u70b9\u5728\u5c3d\u53ef\u80fd\u5feb\u7684\u590d\u73b0\u548c\u7f29\u5c0f\u95ee\u9898\u8303\u56f4\uff0c\u8bb8\u591a\u65b9\u5411\u6700\u7ec8\u88ab\u5b9e\u9a8c\u6392\u9664\uff0c\u4f46\u6bcf\u8f6e\u7ed3\u679c\u90fd\u8ba9\u590d\u73b0\u8303\u56f4\u548c\u89c2\u6d4b\u91cd\u70b9\u66f4\u660e\u786e\uff0c\u987a\u7740\u51fa\u73b0\u95ee\u9898\u7684\u70b9\u4e0d\u65ad\u6dfb\u52a0\u8c03\u8bd5\u8865\u4e01\u8fdb\u884c\u9a8c\u8bc1\uff0c\u6700\u7ec8\u627e\u5230\u4e86\u5185\u6838\u8fd0\u884c\u65f6\u539f\u59cb\u7684\u635f\u574f\u4f4d\u7f6e\u5c31\u4f4d\u4e8e rethook \u8df3\u677f\u672c\u8eab\u4e2d\u3002<\/p>\n<p>\u5728\u4e00\u6b21\u7d2f\u8ba1 55 \u5206\u949f\u7684\u6d4b\u8bd5\u4e2d\uff0c\u4efb\u52a1\u5728 CPU \u4e4b\u95f4\u53cd\u590d\u8fc1\u79fb 4991 \u6b21\uff0c\u8bbe\u5907\u6ca1\u6709\u518d\u51fa\u73b0\u6b7b\u673a\u3002\u6b64\u524d\uff0c\u56e2\u961f\u7528\u591a\u8f6e unsquashfs \u89e3\u538b\u6d4b\u8bd5\u9a8c\u8bc1\u4e86\u6545\u969c\u53ef\u4ee5\u7a33\u5b9a\u590d\u73b0\uff0c\u4e5f\u9a8c\u8bc1\u4e86\u8c03\u8bd5\u6539\u52a8\u5bf9\u73b0\u8c61\u7684\u5f71\u54cd\u3002<\/p>\n<p>\u8fd9\u7c7b\u9519\u8bef\u4ece Linux 6.3 \u7684\u65e7 kretprobe \u5b9e\u73b0\u65f6\u671f\u5c31\u5df2\u5b58\u5728\uff1b\u5207\u6362\u5230 rethook \u540e\uff0c\u76f8\u5173\u7684\u5bc4\u5b58\u5668\u4fdd\u5b58\u4e0e\u6062\u590d\u903b\u8f91\u5ef6\u7eed\u4e86\u4e0b\u6765\uff0c\u5b83\u5e73\u65f6\u4e0d\u5bb9\u6613\u663e\u73b0\uff0c\u9047\u5230\u9ad8\u9891\u63a2\u9488\u3001\u62a2\u5360\u548c\u4efb\u52a1\u8fc1\u79fb\u7b49\u6761\u4ef6\u53e0\u52a0\u65f6\uff0c\u624d\u88ab\u66b4\u9732\u51fa\u6765\u3002<\/p>\n<p>&nbsp;<\/p>\n<section>\n<section data-pm-slice=\"11 4 []\">\n<section data-pm-slice=\"3 3 []\">\n<section>\n<section data-pm-slice=\"11 4 []\">\n<section>\n<section><\/section>\n<section data-pm-slice=\"11 4 []\">\n<section data-pm-slice=\"0 0 []\">\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<h1><strong>\u5df2\u5408\u5165\u4e3b\u7ebf<\/strong><\/h1>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<ul>\n<li data-pm-slice=\"0 0 []\">\u8865\u4e01\u6807\u9898\uff1a<span spellcheck=\"false\"><code><\/code><\/span><span spellcheck=\"false\"><code>LoongArch: Do not save\/restore percpu base register in rethook trampoline<\/code><\/span><\/li>\n<li>\u63d0\u4ea4\u5730\u5740\uff1a<span spellcheck=\"false\">https:\/\/git.kernel.org\/pub\/scm\/linux\/kernel\/git\/torvalds\/linux.git\/commit\/?id=c3f2feace5e4f4b01b68b9f947b19adb4155c32e<\/span><\/li>\n<li>\u4fee\u6539\u6587\u4ef6\uff1a<span spellcheck=\"false\"><code>arch\/loongarch\/kernel\/rethook_trampoline.S<\/code><\/span>\uff0c\u589e 0 \u884c\u3001\u5220 2 \u884c<\/li>\n<li>\u7f3a\u9677\u6765\u6e90\uff1a<span spellcheck=\"false\"><code>Fixes: 3f5536860086d (\"LoongArch: Add kretprobes support\")<\/code><\/span>\uff0c\u5f71\u54cd v6.3 \u53ca\u4ee5\u540e\u3002<\/li>\n<li>\u5df2\u6807\u8bb0\u56de\u5408\u5230\u7a33\u5b9a\u7248\u672c\uff1a<span spellcheck=\"false\"><code><\/code><\/span><span spellcheck=\"false\"><code>Cc: stable@vger.kernel.org # v6.3+<\/code><\/span><\/li>\n<\/ul>\n<section>\n<section data-pm-slice=\"11 4 []\">\n<section data-pm-slice=\"3 3 []\">\n<section>\n<section data-pm-slice=\"11 4 []\">\n<section>\n<section>\n<section>\n<section data-pm-slice=\"11 4 []\">\n<section>\n<section><img loading=\"lazy\" class=\"alignnone size-full wp-image-40290\" src=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2026\/10\/\u56fe\u72472.png\" alt=\"\" width=\"1132\" height=\"506\" srcset=\"https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/\u56fe\u72472.png 1132w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/\u56fe\u72472-300x134.png 300w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/\u56fe\u72472-1024x458.png 1024w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/\u56fe\u72472-150x67.png 150w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/\u56fe\u72472-768x343.png 768w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/\u56fe\u72472-24x11.png 24w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/\u56fe\u72472-36x16.png 36w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2026\/10\/\u56fe\u72472-48x21.png 48w\" sizes=\"(max-width: 1132px) 100vw, 1132px\" \/><\/section>\n<p>&nbsp;<\/p>\n<section><\/section>\n<section data-pm-slice=\"11 4 []\">\n<section data-pm-slice=\"0 0 []\">\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<h1><strong>\u6539\u52a8\u867d\u53ea\u6709\u4e24\u884c\uff0c<\/strong><strong>\u4f46\u5b9a\u4f4d\u5374\u82b1\u4e86\u5f88\u957f\u65f6\u95f4\uff01<\/strong><\/h1>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p data-pm-slice=\"0 0 []\">\u56e0\u4e3a\u6700\u521d\u7684\u73b0\u8c61\u6307\u4e0d\u5230\u8fd9\u91cc\uff0c\u5b89\u88c5\u5361\u6b7b\u3001\u4e32\u53e3\u6ca1\u6709\u6709\u6548\u8f93\u51fa\uff0c\u6216\u662f\u5728\u62a5\u8c03\u5ea6\u5f02\u5e38\u7b49\u5404\u79cd\u9519\u8bef\uff0c\u987a\u7740\u8fd9\u4e9b\u7ebf\u7d22\u5f80\u56de\u4e0d\u65ad\u6dfb\u52a0\u4e86\u51e0\u5341\u4e2a\u8c03\u8bd5\u8865\u4e01\u8fdb\u884c\u5b9a\u4f4d\u6392\u67e5\uff0c\u624d\u4e00\u6b65\u6b65\u8d70\u5230\u8df3\u677f\u51fd\u6570\u3002<\/p>\n<p>\u8fd9\u4e2a\u8fc7\u7a0b\u91cc\u82b1\u65f6\u95f4\u6700\u591a\u7684\u90e8\u5206\uff0c\u662f\u8ba9\u95ee\u9898\u53d8\u5f97\u53ef\u590d\u73b0\u3001\u53ef\u89c2\u6d4b\u3001\u53ef\u9a8c\u8bc1\uff0c\u5199\u4fee\u590d\u53cd\u800c\u662f\u6700\u540e\u4e00\u6b65\u3002<\/p>\n<p>&nbsp;<\/p>\n<section data-pm-slice=\"3 3 []\">\n<section>\n<section data-pm-slice=\"11 4 []\">\n<section>\n<section>\n<section>\n<section data-pm-slice=\"11 4 []\">\n<section>\n<section data-pm-slice=\"0 0 []\">\n<section>\n<section>\n<section>\n<section>\n<section>\n<section>\n<h1><strong>\u7528\u6237\u4f1a\u9047\u5230\u8fd9\u4e2a\u95ee\u9898\u5417\uff1f<\/strong><\/h1>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p>\u8fd9\u9879\u4fee\u590d\u5728\u7528\u6237\u5f00\u59cb\u53cd\u9988\u4e4b\u524d\u5c31\u5df2\u7ecf\u8fdb\u5165\u4e86 Linux \u4e3b\u7ebf\uff0c\u4f9d\u8d56\u7684\u66f4\u65b0\u5148\u4e00\u6b65\u63a8\u5230\u4e86\u5916\u7f51\uff0c\u4fee\u597d\u7684\u5185\u6838\u5f53\u65f6\u8fd8\u6ca1\u8d70\u5b8c\u6d4b\u8bd5\u3001\u6ca1\u5230\u7528\u6237\u624b\u4e0a\uff0c\u4e2d\u95f4\u8fd9\u6bb5\u65f6\u95f4\u5dee\u91cc\uff0c\u7528\u6237\u4ecd\u53ef\u80fd\u9047\u5230\u3002<\/p>\n<p>\u4e00\u4e2a\u4e34\u65f6\u7684\u529e\u6cd5\u662f\uff1a\u5728\u542f\u52a8\u53c2\u6570\u91cc\u52a0\u4e0a preempt=none \u6216 preempt=voluntary\uff0c\u628a\u90a3\u4e2a\u4f1a\u89e6\u53d1\u8c03\u5ea6\u7684\u8ba9\u51fa\u70b9\u7ed5\u8fc7\u53bb\uff0c\u95ee\u9898\u5c31\u4e0d\u4f1a\u53d1\u4f5c\uff08\u8fd9\u4e00\u6b65\u8981\u6c42\u5185\u6838\u7f16\u8bd1\u65f6\u542f\u7528\u4e86 PREEMPT_DYNAMIC\uff0c\u5426\u5219\u542f\u52a8\u53c2\u6570\u4e0d\u751f\u6548\uff09\u3002<\/p>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<hr \/>\n<section>\n<section data-pm-slice=\"11 4 []\">\n<section>\n<section data-pm-slice=\"11 4 []\">\n<section data-pm-slice=\"3 3 [&quot;para&quot;,{&quot;tagName&quot;:&quot;section&quot;,&quot;attributes&quot;:{&quot;style&quot;:&quot;margin-bottom: 0px;line-height: 1.6em;text-align: justify;&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;,&quot;data-layout-id&quot;:null},&quot;para&quot;,{&quot;tagName&quot;:&quot;section&quot;,&quot;attributes&quot;:{&quot;data-pm-slice&quot;:&quot;11 4 []&quot;,&quot;style&quot;:&quot;margin-bottom:0px;&quot;},&quot;namespaceURI&quot;:&quot;http:\/\/www.w3.org\/1999\/xhtml&quot;,&quot;data-layout-id&quot;:null}]\">\n<section>\n<section data-pm-slice=\"11 4 []\">\n<section>\n<p data-pm-slice=\"0 0 []\">\u8fd9\u7c7b\u7f3a\u9677\u53ea\u5728\u7279\u5b9a\u786c\u4ef6\u548c\u7279\u5b9a\u8d1f\u8f7d\u4e0b\u73b0\u8eab\uff0c\u6ca1\u6709\u65e5\u5fd7\u53ef\u4ee5\u987a\u7740\u770b\uff0c\u4e5f\u6ca1\u6709\u6377\u5f84\u53ef\u8d70\uff0c\u80fd\u628a\u5b83\u6316\u51fa\u6765\uff0c\u9760\u7684\u662f\u5de5\u7a0b\u5e08\u613f\u610f\u5728\u6ca1\u4eba\u76ef\u7740\u7684\u5730\u65b9\u628a\u95ee\u9898\u67e5\u5230\u5e95\u3002<\/p>\n<p>\u8fd9\u6b21 deepin LoongArch \u5185\u6838\u8c03\u8bd5\uff0c\u8ba9\u6211\u4eec\u770b\u5230\uff1aAI \u62d3\u5c55\u4e86\u5de5\u7a0b\u5e08\u63a2\u7d22\u95ee\u9898\u7684\u901f\u5ea6\u4e0e\u8fb9\u754c\uff0c\u800c\u771f\u6b63\u63a8\u52a8\u95ee\u9898\u8d70\u5411\u89e3\u51b3\u7684\uff0c\u4ecd\u662f\u5bf9\u6280\u672f\u7684\u656c\u754f\u3001\u5bf9\u8bc1\u636e\u7684\u575a\u6301\u548c\u5bf9\u6bcf\u4e2a\u7ec6\u8282\u7684\u53cd\u590d\u6c42\u8bc1\u3002\u5f53\u667a\u80fd\u5de5\u5177\u4e0e\u5de5\u7a0b\u7ecf\u9a8c\u76f8\u9047\uff0c\u590d\u6742\u95ee\u9898\u4fbf\u6709\u4e86\u66f4\u591a\u88ab\u770b\u89c1\u3001\u88ab\u7406\u89e3\u3001\u88ab\u653b\u514b\u7684\u53ef\u80fd\uff0c\u6bcf\u4e00\u6b21\u5b9a\u4f4d\u4e0e\u4fee\u590d\uff0c\u90fd\u662f\u5bf9\u7cfb\u7edf\u7a33\u5b9a\u6027\u7684\u4e00\u6b21\u52a0\u56fa\uff0c\u4e5f\u662f deepin \u6301\u7eed\u6253\u78e8\u5e95\u5c42\u6280\u672f\u3001\u56de\u5e94\u771f\u5b9e\u7528\u6237\u9700\u6c42\u7684\u5177\u4f53\u5b9e\u8df5\u3002<\/p>\n<p>\u5982\u679c\u4f60\u4e5f\u5bf9 Linux \u5185\u6838\u611f\u5174\u8da3\uff0c\u6b22\u8fce\u6765 deepin \u8bba\u575b\u4e0e\u6211\u4eec\u7684\u7814\u53d1\u4ea4\u6d41<a class=\"weapp_text_link js_weapp_entry wx_tap_link js_wx_tap_highlight\" href=\"https:\/\/bbs.deepin.org\/post\/302381\" data-unique-id=\"mvasp9eg-cw3y3w\" data-miniprogram-type=\"text\" data-miniprogram-appid=\"wxcf1a4dbefee5cb41\" data-miniprogram-path=\"pages\/thread\/thread?id=302381\" data-miniprogram-nickname=\"deepin\u793e\u533a\u8bba\u575b\" data-miniprogram-servicetype=\"0\" data-miniprogram-applink=\"#\u5c0f\u7a0b\u5e8f:\/\/deepin\u8bba\u575b\/MFdOAQPfbtjquXk\">deepin\u8bba\u575b<\/a>\u00a0\u3002<\/p>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>","protected":false},"excerpt":{"rendered":"<p>\u60f3\u8c61\u4e00\u4e0b\u8fd9\u6837\u7684\u573a\u666f\uff1a\u7cfb\u7edf\u5b89\u88c5\u6b63\u8fdb\u884c\u5230\u4e00\u534a\uff0c\u673a\u5668\u6beb\u65e0\u5f81\u5146\u5730\u5361\u6b7b\u4e86\uff0c\u800c\u67e5\u4e32\u53e3\u65e5\u5fd7\uff0c\u53ea\u6709\u51e0\u6761\u96f6\u6563\u7684\u5f02\u5e38\uff0c\u5185\u6838\u95ee\u9898\u7684\u9ebb\u70e6\u5c31\u5728\u8fd9\u91cc\u3002\u51fa\u9519\u7684\u90a3\u4e00\u77ac\u95f4\u7a0d\u7eb5\u5373\u901d\uff0c\u7559\u4e0b\u6765\u7684\u7ebf\u7d22\u8fd8\u81ea\u76f8\u77db\u76fe\uff0c\u771f\u6b63\u7684\u6839\u6e90\u85cf\u5728\u6beb\u4e0d\u8d77\u773c\u7684\u4e00\u5c0f\u6bb5\u6267\u884c\u8def\u5f84\u91cc\uff0c\u6392\u67e5\u8d77\u6765\u50cf\u5927\u6d77\u635e\u9488\u3002 deepin \u6587\u4ef6\u7ba1\u7406\u5668\u63d0\u4f9b\u6587\u4ef6\u7d22\u5f15\u529f\u80fd\uff0c\u7d22\u5f15\u4f7f\u7528\u7684\u5185\u6838\u6a21\u5757\u901a\u8fc7 VFS \u7684 kretprobe hook \u65b9\u6cd5\u6765\u5bf9\u6587\u4ef6\u7cfb\u7edf\u51fd\u6570\u8fdb\u884c\u63d2\u6869\uff0c\u5728\u6587\u4ef6\u8bbf\u95ee\u8fc7\u7a0b\u4e2d\u91c7\u96c6\u7d22\u5f15\u6240\u9700 ...<a href=https:\/\/www.deepin.org.cn\/zh\/hands-on-deepin-loongarch-kernel-fixes\/>\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":18825,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[155],"tags":[],"_links":{"self":[{"href":"https:\/\/www.deepin.org.cn\/zh\/wp-json\/wp\/v2\/posts\/40287"}],"collection":[{"href":"https:\/\/www.deepin.org.cn\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.deepin.org.cn\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.deepin.org.cn\/zh\/wp-json\/wp\/v2\/users\/18825"}],"replies":[{"embeddable":true,"href":"https:\/\/www.deepin.org.cn\/zh\/wp-json\/wp\/v2\/comments?post=40287"}],"version-history":[{"count":5,"href":"https:\/\/www.deepin.org.cn\/zh\/wp-json\/wp\/v2\/posts\/40287\/revisions"}],"predecessor-version":[{"id":40295,"href":"https:\/\/www.deepin.org.cn\/zh\/wp-json\/wp\/v2\/posts\/40287\/revisions\/40295"}],"wp:attachment":[{"href":"https:\/\/www.deepin.org.cn\/zh\/wp-json\/wp\/v2\/media?parent=40287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.deepin.org.cn\/zh\/wp-json\/wp\/v2\/categories?post=40287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.deepin.org.cn\/zh\/wp-json\/wp\/v2\/tags?post=40287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}