{"id":3124,"date":"2024-12-09T05:22:11","date_gmt":"2024-12-09T05:22:11","guid":{"rendered":"https:\/\/tastycounter.net\/index.php\/2024\/12\/09\/linus-torvalds-cac-cap-do-x86-cua-amd-intel-la-rac-ruoi-va-can-phai-loai-bo\/"},"modified":"2024-12-09T05:22:11","modified_gmt":"2024-12-09T05:22:11","slug":"linus-torvalds-cac-cap-do-x86-cua-amd-intel-la-rac-ruoi-va-can-phai-loai-bo","status":"publish","type":"post","link":"https:\/\/tastycounter.net\/index.php\/2024\/12\/09\/linus-torvalds-cac-cap-do-x86-cua-amd-intel-la-rac-ruoi-va-can-phai-loai-bo\/","title":{"rendered":"Linus Torvalds: C\u00e1c c\u1ea5p \u0111\u1ed9 x86 c\u1ee7a AMD Intel l\u00e0 &#8220;r\u00e1c r\u01b0\u1edfi&#8221; v\u00e0 &#8220;c\u1ea7n ph\u1ea3i lo\u1ea1i b\u1ecf&#8221;"},"content":{"rendered":"<\/p>\n<div class=\"content-detail textview\">\n<div class=\"audio\"><audio controls><\/audio><\/div>\n<p>Linus Torvalds, cha \u0111\u1ebb c\u1ee7a Linux, c\u00f3 l\u1ebd l\u00e0 m\u1ed9t trong nh\u1eefng \u00f4ng tr\u00f9m c\u00f4ng ngh\u1ec7 c\u00f3 nhi\u1ec1u ph\u00e1t ng\u00f4n g\u00e2y s\u1ed1c v\u00e0 \u201ckh\u00f4ng ng\u1ea1i va ch\u1ea1m\u201d nh\u1ea5t. Quan \u0111i\u1ec3m c\u1ee7a Torvalds \u0111\u01b0\u1ee3c \u0111\u00e1nh gi\u00e1 l\u00e0 \u201ctuy th\u00f4 m\u00e0 th\u1eadt\u201d, v\u00e0 h\u1ea7u nh\u01b0 lu\u00f4n tr\u1edf th\u00e0nh ch\u1ee7 \u0111\u1ec1 b\u00e0n lu\u1eadn r\u1ea5t th\u00fa v\u1ecb cho d\u00f9 b\u1ea1n c\u00f3 \u0111\u1ed3ng t\u00ecnh hay kh\u00f4ng.<\/p>\n<p>Khi th\u1ea3o lu\u1eadn v\u1ec1 nh\u1eefng thay \u0111\u1ed5i v\u00e0 b\u1ed5 sung cho b\u1ea3n build KConfig (c\u1ea5u h\u00ecnh nh\u00e2n) Linux m\u1edbi, Torvalds \u0111\u00e3 b\u00e0y t\u1ecf s\u1ef1 kh\u00f3 ch\u1ecbu v\u00e0 kh\u00f4ng h\u00e0i l\u00f2ng ra m\u1eb7t \u0111\u1ed1i v\u1edbi c\u00e1c c\u1ea5p t\u00ednh n\u0103ng ki\u1ebfn \u200b\u200btr\u00fac AMD64 ho\u1eb7c x86_64. \u00d4ng cho bi\u1ebft:<\/p>\n<blockquote>\n<p>Ngh\u0129 l\u1ea1i th\u00ec ch\u00fang ta kh\u00f4ng n\u00ean \u0111i s\u00e2u v\u00e0o c\u1ea5p \u0111\u1ed9 vi ki\u1ebfn \u200b\u200btr\u00fac x86-64. \u201cV\u00ec \u0111\u00e2y l\u00e0 th\u1ee9 ng\u1edb ng\u1ea9n&#8221;<\/p>\n<p>To\u00e0n b\u1ed9 c\u00e1c c\u1ea5p \u0111\u1ed9 &#8220;v2&#8221;, &#8220;v3&#8221;, &#8220;v4&#8221; v.v. c\u00f3 v\u1ebb nh\u01b0 \u0111\u1ec1u th\u1eadt \u0111i\u00ean r\u1ed3, ngu ng\u1ed1c v\u00e0 c\u1ea7n ph\u1ea3i lo\u1ea1i b\u1ecf.<\/p>\n<p>Ch\u00fang kh\u00f4ng li\u00ean quan \u0111\u1ebfn b\u1ea5t c\u1ee9 \u0111i\u1ec1u g\u00ec. Vui l\u00f2ng *kh\u00f4ng* \u0111\u01b0a c\u00e1i th\u1ee9 v\u1edb v\u1ea9n \u0111\u00f3 v\u00e0o ngu\u1ed3n kernel.<\/p>\n<p>T\u00f4i kh\u00f4ng bi\u1ebft ai \u0111\u00e3 ngh\u0129 ra c\u00e1i th\u1ee9 r\u00e1c r\u01b0\u1edfi &#8220;m\u1ee9c ki\u1ebfn \u200b\u200btr\u00fac vi m\u00f4&#8221;, nh\u01b0ng theo nh\u01b0 t\u00f4i bi\u1ebft, n\u00f3 ho\u00e0n to\u00e0n kh\u00f4ng ch\u00ednh th\u1ee9c v\u00e0 l\u00e0 m\u1ed9t m\u00f4 h\u00ecnh \u0111\u1ea7y l\u1ed7i.<\/p>\n<p>C\u00f3 m\u1ed9t m\u00f4 h\u00ecnh r\u1ea5t th\u1ef1c t\u1ebf cho c\u00e1c t\u00ednh n\u0103ng ki\u1ebfn \u200b\u200btr\u00fac vi m\u00f4 v\u00e0 \u0111\u00f3 l\u00e0 c\u00e1c bit CPUID. C\u1ed1 g\u1eafng tuy\u1ebfn t\u00ednh h\u00f3a c\u00e1c bit \u0111\u00f3 v\u1ec1 m\u1eb7t k\u1ef9 thu\u1eadt l\u00e0 sai, v\u00ec nh\u1eefng th\u1ee9 n\u00e0y \u0111\u01a1n gi\u1ea3n kh\u00f4ng ph\u1ea3i l\u00e0 m\u1ed9t lo\u1ea1i ti\u1ebfn tr\u00ecnh tuy\u1ebfn t\u00ednh.<\/p>\n<p>V\u00e0 t\u1ec7 h\u01a1n, ng\u01b0\u1eddi ta coi \u0111\u00f3 l\u00e0 m\u1ed9t &#8220;s\u1ef1 \u0111\u01a1n gi\u1ea3n h\u00f3a&#8221;, nh\u01b0ng th\u1ef1c t\u1ebf l\u00e0 l\u00e0m t\u0103ng th\u00eam s\u1ef1 ph\u1ee9c t\u1ea1p. B\u00e2y gi\u1edd thay v\u00ec h\u1ecfi &#8220;CPU n\u00e0y c\u00f3 h\u1ed7 tr\u1ee3 l\u1ec7nh cmpxchgb16 kh\u00f4ng?&#8221;, th\u00ec c\u00e2u h\u1ecfi l\u1ea1i tr\u1edf th\u00e0nh &#8220;&#8216;v3&#8217; c\u00f3 ngh\u0129a l\u00e0 g\u00ec n\u1eefa?&#8221;.<\/p>\n<p>Kh\u00f4ng. Ch\u00fang t\u00f4i *KH\u00d4NG* \u0111\u01b0a s\u1ef1 ngu ng\u1ed1c \u0111\u00f3 v\u00e0o kernel.<\/p>\n<p>Linus<\/p>\n<\/blockquote>\n<p>\u0110\u1ed1i v\u1edbi nh\u1eefng ai ch\u01b0a bi\u1ebft, c\u00e1c c\u1ea5p \u0111\u1ed9 vi ki\u1ebfn \u200b\u200btr\u00fac x86-64 n\u00e0y \u0111\u00e3 \u0111\u01b0\u1ee3c k\u1ef9 s\u01b0 Florian Weimer c\u1ee7a Red Hat gi\u1edbi thi\u1ec7u v\u00e0o n\u0103m 2020. Ban \u0111\u1ea7u, &#8220;c\u00e1c Levels A, B v\u00e0 C&#8221; \u0111\u01b0\u1ee3c \u0111\u1ec1 xu\u1ea5t, v\u00e0 sau \u0111\u00f3 &#8220;Level D&#8221; \u0111\u00e3 \u0111\u01b0\u1ee3c th\u00eam v\u00e0o.<\/p>\n<div id=\"articleads\" class=\"adbox adsense in-article\"><ins class=\"adsbygoogle\" style=\"text-align:center\" data-ad-format=\"fluid\" data-ad-layout=\"in-article\" data-ad-client=\"ca-pub-9275417305531302\" data-ad-slot=\"2079243249\"><\/ins><\/div>\n<p>V\u1ec1 c\u01a1 b\u1ea3n, nh\u1eefng c\u1ea5p \u0111\u1ed9 n\u00e0y \u0111\u01b0\u1ee3c \u0111\u1eb7t ra \u0111\u1ec3 ph\u00e2n lo\u1ea1i c\u00e1c t\u00ednh n\u0103ng CPU theo c\u00e1ch th\u1eddi gian\/th\u1ee9 t\u1ef1 th\u1eddi gian nh\u1eb1m m\u1ee5c \u0111\u00edch \u0111\u01a1n gi\u1ea3n h\u00f3a vi\u1ec7c c\u1ea3i thi\u1ec7n kh\u1ea3 n\u0103ng t\u01b0\u01a1ng th\u00edch v\u00e0 s\u1ef1 ph\u1ed1i h\u1ee3p gi\u1eefa ph\u1ea7n c\u1ee9ng v\u00e0 h\u1ec7 \u0111i\u1ec1u h\u00e0nh\/ph\u1ea7n m\u1ec1m th\u00f4ng qua c\u00e1c t\u1ed1i \u01b0u h\u00f3a bi\u00ean d\u1ecbch t\u1ed1t h\u01a1n:<\/p>\n<ul>\n<li><strong>x86-64-v2 <\/strong>h\u1ed7 tr\u1ee3 cho c\u00e1c l\u1ec7nh vector l\u00ean \u0111\u1ebfn Streaming SIMD Extensions 4.2 (SSE4.2) v\u00e0 Supplemental Streaming SIMD Extensions 3 (SSSE3), l\u1ec7nh POPCNT (h\u1eefu \u00edch cho ph\u00e2n t\u00edch d\u1eef li\u1ec7u v\u00e0 bit-fiddling trong m\u1ed9t s\u1ed1 c\u1ea5u tr\u00fac d\u1eef li\u1ec7u) v\u00e0 CMPXCHG16B (m\u1ed9t l\u1ec7nh so s\u00e1nh v\u00e0 ho\u00e1n \u0111\u1ed5i hai t\u1eeb h\u1eefu \u00edch cho c\u00e1c thu\u1eadt to\u00e1n \u0111\u1ed3ng th\u1eddi).<\/li>\n<li><strong>x86-64-v3<\/strong> b\u1ed5 sung c\u00e1c l\u1ec7nh vector l\u00ean \u0111\u1ebfn AVX2, MOVBE (\u0111\u1ec3 truy c\u1eadp d\u1eef li\u1ec7u big-endian) v\u00e0 c\u00e1c l\u1ec7nh thao t\u00e1c bit b\u1ed5 sung.<\/li>\n<li><strong>x86-64-v4<\/strong> bao g\u1ed3m c\u00e1c l\u1ec7nh vector t\u1eeb m\u1ed9t s\u1ed1 bi\u1ebfn th\u1ec3 AVX-512.<\/li>\n<\/ul>\n<p>Linus Torvalds c\u1ea3m th\u1ea5y c\u00e1c c\u1ea5p \u0111\u1ed9 ki\u1ebfn \u200b\u200btr\u00fac n\u00e0y l\u00e0m m\u1ecdi th\u1ee9 ph\u1ee9c t\u1ea1p h\u01a1n thay v\u00ec \u0111\u01a1n gi\u1ea3n h\u00f3a v\u1ea5n \u0111\u1ec1, v\u00ec vi\u1ec7c tuy\u1ebfn t\u00ednh h\u00f3a ti\u1ebfn tr\u00ecnh c\u1ee7a c\u00e1c l\u1ec7nh v\u00e0 t\u00ednh n\u0103ng ph\u1ea7n c\u1ee9ng kh\u00f4ng ph\u1ea3i l\u00e0 m\u1ed9t c\u00e1ch ti\u1ebfp c\u1eadn th\u1ef1c t\u1ebf.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"margin-left:auto;margin-right:auto\" src=\"https:\/\/st.quantrimang.com\/photos\/image\/holder.png\" alt=\"Linus Torvalds\" width=\"640\" height=\"640\" class=\"lazy\" data-src=\"https:\/\/st.quantrimang.com\/photos\/image\/2024\/12\/09\/cac-cap-do-x86-cua-amd-intel-la-rac1.jpg\"><\/p>\n<p>\u1ede \u0111\u00e2y, quan \u0111i\u1ec3m c\u1ee7a Torvalds l\u00e0 c\u00f3 l\u00fd v\u00ec ch\u00fang ta th\u01b0\u1eddng th\u1ea5y m\u1ed9t s\u1ed1 l\u1ec7nh CPU nh\u1ea5t \u0111\u1ecbnh, ch\u1eb3ng h\u1ea1n nh\u01b0 AVX, c\u00f3 th\u1ec3 t\u1ed3n t\u1ea1i trong m\u1ed9t s\u1ed1 h\u1ecd vi x\u1eed l\u00fd nh\u01b0ng sau \u0111\u00f3 n\u00f3 bi\u1ebfn m\u1ea5t. M\u1ed9t v\u00ed d\u1ee5 g\u1ea7n \u0111\u00e2y l\u00e0 Intel gi\u1edbi thi\u1ec7u AVX-512 trong Rocket Lake th\u1ebf h\u1ec7 th\u1ee9 11 r\u1ed3i sau \u0111\u00f3 lo\u1ea1i b\u1ecf n\u00f3 \u1edf c\u00e1c th\u1ebf h\u1ec7 ti\u1ebfp theo.<\/p>\n<p>\u0110i\u1ec1u \u0111\u00e1ng ch\u00fa \u00fd \u1edf \u0111\u00e2y l\u00e0 Linus Torvalds hi\u1ec7n l\u00e0 m\u1ed9t nh\u00e2n v\u1eadt n\u1ed5i ti\u1ebfng c\u1ee7a x86 Ecosystem Advisory Group m\u1edbi th\u00e0nh l\u1eadp, n\u00ean \u00fd ki\u1ebfn \u200b\u200b\u0111\u00f3ng g\u00f3p c\u1ee7a \u00f4ng ch\u1eafc ch\u1eafn c\u00f3 gi\u00e1 tr\u1ecb.<\/p>\n<p>B\u1ea1n ngh\u0129 sao v\u1ec1 quan \u0111i\u1ec3m tr\u00ean? H\u00e3y \u0111\u1ec3 l\u1ea1i \u00fd ki\u1ebfn b\u00ecnh lu\u1eadn nh\u00e9<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Linus Torvalds, cha \u0111\u1ebb c\u1ee7a Linux, c\u00f3 l\u1ebd l\u00e0 m\u1ed9t trong nh\u1eefng \u00f4ng tr\u00f9m c\u00f4ng ngh\u1ec7 c\u00f3 nhi\u1ec1u ph\u00e1t ng\u00f4n g\u00e2y s\u1ed1c v\u00e0 \u201ckh\u00f4ng ng\u1ea1i va ch\u1ea1m\u201d nh\u1ea5t. Quan \u0111i\u1ec3m c\u1ee7a Torvalds \u0111\u01b0\u1ee3c \u0111\u00e1nh gi\u00e1 l\u00e0 \u201ctuy th\u00f4 m\u00e0 th\u1eadt\u201d, v\u00e0 h\u1ea7u nh\u01b0 lu\u00f4n tr\u1edf th\u00e0nh ch\u1ee7 \u0111\u1ec1 b\u00e0n lu\u1eadn r\u1ea5t th\u00fa v\u1ecb cho d\u00f9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3125,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3124","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-khong-phan-loai"],"_links":{"self":[{"href":"https:\/\/tastycounter.net\/index.php\/wp-json\/wp\/v2\/posts\/3124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tastycounter.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tastycounter.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tastycounter.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tastycounter.net\/index.php\/wp-json\/wp\/v2\/comments?post=3124"}],"version-history":[{"count":0,"href":"https:\/\/tastycounter.net\/index.php\/wp-json\/wp\/v2\/posts\/3124\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tastycounter.net\/index.php\/wp-json\/wp\/v2\/media\/3125"}],"wp:attachment":[{"href":"https:\/\/tastycounter.net\/index.php\/wp-json\/wp\/v2\/media?parent=3124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tastycounter.net\/index.php\/wp-json\/wp\/v2\/categories?post=3124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tastycounter.net\/index.php\/wp-json\/wp\/v2\/tags?post=3124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}