{"id":173001,"date":"2013-03-21T09:47:03","date_gmt":"2013-03-21T05:47:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=173001"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=173001","title":{"rendered":"<span class=\"post_title\">\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0438 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044f\u0434\u0440\u0430 \u0435\u0441\u0442\u044c \u00ab\u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439\u00bb \u043a\u044d\u0448 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0438 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u0435\u0439?<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0423 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b Core i7 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439, \u043d\u043e \u043e\u0442\u0447\u0435\u0433\u043e-\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0434\u0430\u0436\u0435 \u0441\u0440\u0435\u0434\u0438 \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u0432 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 priority inversion. \u0415\u0433\u043e \u044f \u043e\u043f\u0438\u0448\u0443 \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435. \u0412 \u043d\u0435\u043c \u0435\u0441\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 \u0421, \u0442\u0440\u0438 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b, \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u044d\u0448\u0435\u0439 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b Core i7. \u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u043e\u043a\u0440\u043e\u0432\u043e\u0432 \u043d\u0435 \u0441\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0432\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0434\u0430\u0432\u043d\u043e \u043e\u0431\u0449\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430.<\/p>\n<p>  <a href=\"http:\/\/en.wikipedia.org\/wiki\/Priority_inversion\">Priority inversion<\/a> \u2013 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u043d\u0438\u0437\u043a\u043e\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u043c\u0435\u0434\u043b\u044f\u0442\u044c \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u044b\u0439. \u041e\u0431\u044b\u0447\u043d\u043e \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0443 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u043d\u0430 \u044f\u0434\u0440\u0435 \u0434\u043b\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0438\u0437\u043a\u043e\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u043e\u0433\u043e. \u0421 \u044d\u0442\u0438\u043c \u0434\u043e\u043b\u0436\u043d\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u044f\u0434\u0440\u043e \u041e\u0421. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u043c\u0438\u043c\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u044f\u0434\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c affinity \u0438 MSI-X, \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 \u0435\u0441\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u043e\u0431\u0449\u0438\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0437\u0430\u0434\u0430\u0447 \u2013 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043f\u0430\u043c\u044f\u0442\u0438, QPI, \u043e\u0431\u0449\u0438\u0439 \u043a\u044d\u0448 \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f, PCIe \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0412 \u0432\u043e\u043f\u0440\u043e\u0441\u044b PCIe \u044f \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0443, \u0442.\u043a. \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0441\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u043c \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435. Priority inversion \u043d\u0430 \u043f\u043e\u0447\u0432\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 QPI \u044f \u0434\u0430\u0432\u043d\u043e \u043d\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u043b \u2013 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u043d\u043e\u0433\u043e\u043a\u0430\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u044b\u043c, \u0438 \u043d\u0438\u0437\u043a\u043e\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u044b\u043c \u0437\u0430\u0434\u0430\u0447\u0430\u043c. \u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0441\u044c \u043d\u0430 \u043a\u044d\u0448\u0430\u0445.<br \/>   <a name=\"habracut\"><\/a><br \/>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u0441 \u043a\u044d\u0448\u0430\u043c\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b Core i7 \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u044f. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0434\u0430\u0436\u0435 \u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u043a\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u044f. <br \/>  <img decoding=\"async\" src=\"http:\/\/lh5.googleusercontent.com\/-SKYvRMCbb4w\/UUTDbD90UgI\/AAAAAAAALcI\/PptQpMMwzaQ\/s800\/smart-cache.jpg\" alt=\"image\"\/><br \/>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u0438 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 Nehalem, Westmere, Sandy Bridge, Ivy Bridge \u0438 Haswell \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u0430. \u041a\u0441\u0442\u0430\u0442\u0438, \u0441\u0430\u043c\u043e\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u0441\u0435 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0432\u043d\u0443\u0442\u0440\u0438 Sandy Bridge \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"http:\/\/www.edn.com\/design\/systems-design\/4399725\/1\/Memory-Hierarchy-Design---Part-6--The-Intel-Core-i7\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u0425\u0435\u043d\u043d\u0435\u0441\u0438 (\u0434\u0430, \u0442\u043e\u0433\u043e \u0441\u0430\u043c\u043e\u0433\u043e).<\/p>\n<p>  \u041c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043a\u044d\u0448 \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f (LLC), \u0441\u0430\u043c\u044b\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u044f\u0434\u0440\u0430 \u2013 \u0438 \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u00ab\u0440\u0438\u0441\u0443\u044e\u0442 \u0444\u043e\u0440\u043c\u043e\u0447\u043a\u0438\u00bb \u2014 \u043d\u0438\u0437\u043a\u043e\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u044b\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b, \u0438 \u0442\u0435, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u043e\u0442 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u043b\u0438 local APIC timer, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0434\u043e \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438 \u0432\u044b\u0434\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. Eviction policy \u043a\u044d\u0448\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u2013 \u043d\u0435\u043a\u043e\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0435 \u043a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Cache_algorithms#Least_Recently_Used\">LRU<\/a>. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0438 \u0447\u0435\u043c \u0447\u0430\u0449\u0435 \u043d\u0435\u043a\u043e\u0435 \u044f\u0434\u0440\u043e \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u044d\u0448\u0435\u043c, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c LLC \u0435\u043c\u0443 \u0434\u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f. \u041f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u044b? \u041a\u0430\u043a\u0438\u0435 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u044b?? \u041a\u0441\u0442\u0430\u0442\u0438, \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043d\u0435 \u0442\u0430\u043a \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e, \u043a\u0430\u043a \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u044b\u0435, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043a\u044d\u0448\u0430. \u0410 \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0436\u0434\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0435\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043a\u043e\u0434 \u0432\u044b\u0442\u0435\u0441\u043d\u044f\u044e\u0442\u0441\u044f \u0438\u0437 LLC. \u042f \u043a\u0430\u043a-\u0442\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u0443\u0436\u0435 <a href=\"http:\/\/habrahabr.ru\/company\/intel\/blog\/117760\/\">\u043f\u0438\u0441\u0430\u043b<\/a>, \u043d\u043e \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043a \u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u0442\u0443 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u043b \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441 \u043e\u0431 \u044d\u043a\u0441\u043a\u043b\u044e\u0437\u0438\u0432\u043d\u043e\u0441\u0442\u0438 L1\/L2 \u043a\u044d\u0448\u0430.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0443 \u0432\u044b\u0448\u0435, \u0442\u043e \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044f\u0434\u0440\u0430 \u0435\u0441\u0442\u044c \u00ab\u0441\u0432\u043e\u0439\u00bb \u043a\u044d\u0448, \u043e\u0431\u044a\u0435\u043c\u043e\u043c \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c 256 \u043a\u0438\u043b\u043e\u0431\u0430\u0439\u0442. \u0411\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f .text \u0438 .data \u043c\u043d\u043e\u0433\u0438\u0445 realtime \u0437\u0430\u0434\u0430\u0447. \u041d\u0443 \u0445\u043e\u0442\u044f \u0431\u044b \u043d\u0430 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 32\u043a\u0431 \u0434\u0430\u043d\u043d\u044b\u0445 + 32\u043a\u0431 \u043a\u043e\u0434\u0430 \u0432 \u043a\u044d\u0448\u0435 \u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043e\u0442\u043a\u043b\u0438\u043a\u0430 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a\u0442\u043e\u0432 \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c? \u042d\u0442\u043e \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c. <\/p>\n<p>  \u041e\u0442\u043a\u043b\u044e\u0447\u0430\u044e \u0433\u0438\u043f\u0435\u0440\u0442\u0440\u0435\u0434\u0438\u043d\u0433 \u0438 power management. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043c\u0438\u043a\u0440\u043e\u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a:<\/p>\n<p>  <b>Helper functions<\/b><\/p>\n<pre><code class=\"cpp\">#define POOL_SIZE_L1D_LINES 512 #define POOL_SIZE_L2_LINES 8192 \/\/ This can differ on your CPU. Check with CPUID or some system diagnostics tool #define POOL_SIZE_LLC_LINES 6*1024*1024\/64   \/\/ Yes, I waste 3\/4 of space for the sake of test simplicity \/\/ 1 cache line == 1 linked list item.  \/\/ Pointer length is hard coded to 8 bytes (Intel 64) struct list_item {     unsigned long long int tick;     list_item *next;     unsigned char padding[48]; };  \/\/ Build a linked list of size N with pseudo-random pattern void build_list(list_item *head, int N, int A, int B) {     int C = B;     list_item *current = head;     for (int i = 0; i &lt; N - 1; i++) {         current-&gt;tick = 0;         C = (A*C + B) % N;         current-&gt;next = (list_item*)&(head[C]);         current = current-&gt;next;     } }  \/\/ Touch first N elements in a linked list void warmup_list(list_item* current, int N) {     bool write = (N &gt; POOL_SIZE_L2_LINES) ? true : false;     for(int i = 0; i &lt; N - 1; i++) {         current = current-&gt;next; \/\/ No write is needed to keep a line in L1, but looks like it is needed to keep it in L2!!         if (write) current-&gt;tick++; \/\/ FIXME AK: to check on IVB, HSW     } } <\/code><\/pre>\n<p>  build_list \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0444\u0435\u0442\u0447\u0435\u0440 \u043d\u0435 \u043c\u043e\u0433 \u043d\u0430\u0439\u0442\u0438 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u0417\u0430\u043e\u0434\u043d\u043e, \u0432\u0435\u0441\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u044d\u0448\u0435, \u0432 \u0442\u043e\u043c \u0435\u0433\u0443 \u0443\u0440\u043e\u0432\u043d\u0435, \u043a\u0443\u0434\u0430 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u0441\u044f. <\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430 \u044f\u0434\u0440\u0435 \u043d\u043e\u043c\u0435\u0440 2 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043e\u0431\u0445\u043e\u0434 \u0441\u043f\u0438\u0441\u043a\u0430, \u0438 \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044e.<\/p>\n<p>  <b>Linked list traversal speed measurements<\/b><\/p>\n<pre><code class=\"cpp\">void measure(list_item* head, int N) {     unsigned __int64 i1, i2, avg = 0;      for (int j = 0; j &lt; 50; j++) {         list_item* current = head; #if WARMUP_ON         while(in_copy) warmup_list(head, N); #else         while(in_copy) spin_sleep(1);  #endif         i1 = __rdtsc();         for(int i = 0; i &lt; N; i++) {             current-&gt;tick++;             current = current-&gt;next;         }         i2 = __rdtsc();         avg += (i2-i1)\/50;         in_copy = true;     }     printf(&quot;%i\\n&quot;, avg\/N); } <\/code><\/pre>\n<p>  \u041a\u043e\u0434 \u043f\u043e\u0442\u043e\u043a\u0430, \u0438\u0437\u043c\u0435\u0440\u044f\u044e\u0449\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0445\u043e\u0434\u0430 \u043f\u043e \u0441\u043f\u0438\u0441\u043a\u0430\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439:<\/p>\n<p>  <b>Measurements for different linked list sizes<\/b><\/p>\n<pre><code class=\"cpp\">\/\/ We initialize the linked list only once, and make it big enough to make sure  \/\/ we do not observe effects of spatial locality but only effects of temporal locality \/\/ Magic numbers 509, 509 &lt;= Hull-Dobell Theorem criteria build_list(head, POOL_SIZE_LLC_LINES*2, 509, 509);  for (int i = 10; i &lt; POOL_SIZE_L1D_LINES; i+=5) {     warmup(head, i);     measure(head, i); };  for (int i = POOL_SIZE_L1D_LINES; i &lt; POOL_SIZE_L2_LINES; i+=50) {     warmup(head, i);     measure(head, i); };  for (int i = POOL_SIZE_L2_LINES; i &lt; POOL_SIZE_LLC_LINES*2; i+=1000) {     warmup(head, i);     measure(head, i); }; <\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0442\u043e\u043a, \u0437\u0430\u0431\u0438\u0432\u0430\u044e\u0449\u0438\u0439 \u043a\u044d\u0448 \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f: \u043f\u0443\u0441\u0442\u044c \u043a\u0440\u0443\u0442\u0438\u0442\u0441\u044f \u043d\u0430 \u044f\u0434\u0440\u0435 \u043d\u043e\u043c\u0435\u0440 3, \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442 18\u041c\u0431 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0443\u0434\u0430-\u0441\u044e\u0434\u0430. 18\u041c\u0431 \u2013 \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0437\u0430\u0431\u0438\u0442\u044c LLC. \u041f\u0443\u0441\u0442\u044c \u043e\u043d \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043f\u0435\u0440\u0432\u044b\u043c \u043f\u043e\u0442\u043e\u043a\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0447\u0442\u0438 \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0441 \u043a\u044d\u0448\u0435\u043c. (\u042f \u0432 \u043a\u0443\u0440\u0441\u0435, \u0447\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u043f\u0438\u043d\u043b\u043e\u043a\u0430 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f \u0438 \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0430\u044f, \u0438 \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u043c\u0443 \u0442\u0430\u0439\u043c\u0438\u043d\u0433\u0443.)<\/p>\n<p>  <b>A thread that runs on another core and consumes LLC<\/b><\/p>\n<pre><code class=\"cpp\">list_item *area1 = (list_item *)malloc(POOL_SIZE_LLC_LINES*64*2); list_item *area2 = (list_item *)malloc(POOL_SIZE_LLC_LINES*64*2);  while (true) {     while(!in_copy) spin_sleep(1);  #if DISRUPT_ON     memcpy(area1, area2, POOL_SIZE_LLC_LINES*64*3);     memcpy(area2, area1, POOL_SIZE_LLC_LINES*64*3); #else     spin_sleep(10);  #endif     in_copy = false; }; <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u0442\u0440\u0438 \u0432\u0438\u0434\u0430 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439:<br \/>  <img decoding=\"async\" src=\"http:\/\/lh5.googleusercontent.com\/-RO68vZ_T6hI\/UUa32FjuFGI\/AAAAAAAALgE\/bwj4ZZKhVWg\/s640\/cache4.jpg\" alt=\"image\"\/>  <\/p>\n<ul>\n<li>Baseline, \u00ab\u043a\u0440\u0430\u0441\u043d\u044b\u0439\u00bb \u0442\u0435\u0441\u0442, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u0445\u043e\u0434\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432 \u0431\u043b\u0430\u0433\u043e\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u2014 \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0442\u043e\u043a \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043a\u044d\u0448. <\/li>\n<li>\u041f\u043b\u043e\u0445\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u00ab\u0441\u0438\u043d\u0438\u0439\u00bb \u0442\u0435\u0441\u0442, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0442\u043e\u043a \u0443\u0441\u043f\u0435\u0435\u0442 \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0441\u0435\u0431\u0435 \u0432\u0435\u0441\u044c \u043e\u0431\u044a\u0435\u043c LLC, \u043f\u043e\u043a\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u0432\u0438\u0441\u0438\u0442 \u0432 \u0441\u043f\u0438\u043d\u043b\u043e\u043a\u0435.<\/li>\n<li>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u00ab\u0437\u0435\u043b\u0435\u043d\u044b\u0439\u00bb \u0442\u0435\u0441\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0434\u0430\u043d\u043d\u044b\u0435.<\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u044f \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b \u0442\u0435\u0441\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0442\u043e\u043a\u0430-\u0432\u0440\u0435\u0434\u0438\u0442\u0435\u043b\u044f \u0443\u043c\u0435\u0449\u0430\u043b\u0438\u0441\u044c \u0432 \u0435\u0433\u043e \u00ab\u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439\u00bb L2. \u041a\u0430\u043a \u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c, \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0432\u043b\u0438\u044f\u043d\u0438\u044f \u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u0445\u043e\u0434\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u0435\u0440\u0432\u044b\u043c \u043f\u043e\u0442\u043e\u043a\u043e\u043c \u043d\u0435 \u0431\u044b\u043b\u043e. (\u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b\u0442\u044c \u0432\u0438\u0434\u043d\u044b conflict miss&#8217;\u044b, \u043d\u043e \u044f \u0438\u0445 \u043d\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u043b) <\/p>\n<p>  \u0412\u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0439:<br \/>  <img decoding=\"async\" src=\"http:\/\/lh4.googleusercontent.com\/-ST6ongBi7vo\/UUijnBfq13I\/AAAAAAAALgY\/UP54MFtJg-8\/s852\/cache.jpg\" alt=\"image\"\/><br \/>  \u041f\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u0438 \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435. \u041f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438 \u2014 \u0446\u0438\u043a\u043b\u044b CPU, \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u044b\u0435 \u043d\u0430 \u043f\u0440\u043e\u0445\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u0438\u043d \u044d\u043b\u0435\u043c\u0435\u043d\u0442. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u00ab\u0441\u0442\u0443\u043f\u0435\u043d\u044c\u043a\u0438\u00bb (\u0433\u0440\u0430\u0444\u0438\u043a, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u0438\u0434\u043d\u044b \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043a\u044d\u0448\u0435\u0439) \u043d\u0430\u0434\u043e \u043b\u0438\u0448\u044c \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0438\u0432 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043d\u0435\u043c\u043d\u043e\u0433\u043e spatial locality.<\/p>\n<p>  \u0414\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f, \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u0433\u043e\u043d\u044f\u043b \u044d\u0442\u043e\u0442 \u0442\u0435\u0441\u0442, \u0432\u0440\u0435\u043c\u0435\u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435:   <\/p>\n<ul>\n<li>L1D hit = 4 \u0446\u0438\u043a\u043b\u0430,<\/li>\n<li>L2 hit = 11 \u0446\u0438\u043a\u043b\u043e\u0432,<\/li>\n<li>LLC hit = 31 \u0446\u0438\u043a\u043b,<\/li>\n<li>DRAM hit = ~100 \u0446\u0438\u043a\u043b\u043e\u0432,<\/li>\n<\/ul>\n<p>  \u0412\u0440\u0435\u043c\u044f, \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043e\u0435 \u043d\u0430 \u043e\u0434\u0438\u043d \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043f\u043e \u0441\u043f\u0438\u0441\u043a\u0443, \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e<br \/>  L1D_hit*P(L1D_hit) + L2_hit*P(L2_hit) + LLC_hit*P(LLC_hit) + DRAM_hit*P(DRAM_hit), \u0433\u0434\u0435 P \u2014 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u043a\u044d\u0448\u0430. \u0422.\u0435.<br \/>  P(L1D_hit) + P(L2_hit) + P(LLC_hit) + P(DRAM_hit) = 1<br \/>  \u041a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b \u0441\u043f\u0438\u0441\u043a\u0430 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u044d\u0448\u0435\u0439, \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u043e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Vtune, oprofile \u0438\u043b\u0438 Linux perf. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043e\u0442 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Vtune \u0434\u043b\u044f \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b \u0441\u043f\u0438\u0441\u043a\u0430, \u0440\u0430\u0432\u043d\u043e\u0439 16384 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 (512 \u043a\u0438\u043b\u043e\u0431\u0430\u0439\u0442).  <\/p>\n<table border=\"1\" cellpadding=\"3\" cellspacing=\"3\">\n<tr>\n<td><\/td>\n<td><font color=\"red\">undisturbed<\/font><\/td>\n<td><font color=\"blue\">disturbed<\/font><\/td>\n<td><font color=\"green\">warmup<\/font><\/td>\n<\/tr>\n<tr>\n<td>L1 hit%<\/td>\n<td>0.08<\/td>\n<td>0<\/td>\n<td>63<\/td>\n<\/tr>\n<tr>\n<td>L2 hit%<\/td>\n<td>72<\/td>\n<td>0.07<\/td>\n<td>0.1<\/td>\n<\/tr>\n<tr>\n<td>LLC hit%<\/td>\n<td>25<\/td>\n<td>2.6<\/td>\n<td>22<\/td>\n<\/tr>\n<tr>\n<td>DRAM hit%<\/td>\n<td>3<\/td>\n<td>97<\/td>\n<td>15<\/td>\n<\/tr>\n<tr>\n<td>DTLB miss%<\/td>\n<td>21<\/td>\n<td>66<\/td>\n<td>37<\/td>\n<\/tr>\n<\/table>\n<p>Vtune \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442, \u0447\u0442\u043e \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u00ab\u0441\u0438\u043d\u0438\u043c\u00bb \u0438 \u00ab\u0437\u0435\u043b\u0435\u043d\u044b\u043c\u00bb \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u0438 \u043f\u0440\u043e\u043c\u0430\u0445\u043e\u0432 \u043f\u043e \u043a\u044d\u0448\u0430\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0443\u0440\u043e\u0432\u043d\u0435\u0439, \u0432\u044b\u0437\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u043c \u043a \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u0441\u043f\u0438\u0441\u043a\u0430. \u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0431\u044b\u043b\u0438 \u0432\u044b\u0442\u0435\u0441\u043d\u0435\u043d\u044b \u0438\u0437 \u043a\u044d\u0448\u0430 \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f, \u043e\u043d\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u043d\u0432\u0430\u043b\u0438\u0434\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u043a\u044d\u0448\u0430\u0445 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0438 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u044f\u0434\u0440\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0430\u043c\u0438 \u0446\u0438\u0444\u0440\u044b \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u043d\u044b\u0445 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439 \u0431\u044b\u043b\u0438 \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u0412 \u00ab\u0441\u0438\u043d\u0435\u0439\u00bb \u043a\u043e\u043b\u043e\u043d\u043a\u0435 \u0441\u044e\u0440\u043f\u0440\u0438\u0437\u043e\u0432 \u043d\u0435\u0442, \u0430 \u0432 \u043a\u0440\u0430\u0441\u043d\u043e\u0439 \u044f \u043e\u0436\u0438\u0434\u0430\u043b \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u0439 \u0432 L1, \u0430 \u0432 \u00ab\u0437\u0435\u043b\u0435\u043d\u043e\u0439\u00bb \u2014 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u0439 \u0432 L2.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0431\u044b \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u043f\u0440\u043e\u0441\u044b\u043f\u0430\u043b\u0441\u044f \u043f\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044e, \u0432 \u00ab\u0441\u0438\u043d\u0435\u043c\u00bb \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0434\u0430\u0436\u0435 IDT \u0438 \u043a\u043e\u0434 ISR \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0431\u044b \u0442\u0430\u0449\u0438\u0442\u044c \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0431\u044b\u043b \u0431\u044b \u0443\u0436\u0435 \u0432\u044b\u0442\u0435\u0441\u043d\u0435\u043d \u0438\u0437 L1I, L2, \u0438 LLC. \u041a \u043c\u043e\u0435\u043c\u0443 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u043c\u0443 \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0443 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b Core i7 \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u00ab\u0437\u0430\u043b\u043e\u0447\u0438\u0442\u044c\u00bb \u0447\u0430\u0441\u0442\u044c LLC \u0434\u043b\u044f \u044d\u043a\u0441\u043a\u043b\u044e\u0437\u0438\u0432\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u044f\u0434\u0440\u043e\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0432\u0430\u0436\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 LLC, \u0438, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u0438\u0437 L2 \u0438 L1 \u2014 \u043f\u0435\u0440\u0435\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0445 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u044f \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u0445\u043e\u0447\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u044f \u043d\u0430\u0448\u0435\u043b \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 Core i7. \u0422\u0430\u043a\u0430\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u044d\u0448\u0430 (\u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0442\u043e\u0442, \u043a\u043e\u043c\u0443 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0430\u0434\u043e) \u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 (\u0434\u0435\u0441\u043a\u0442\u043e\u043f, \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u043a) \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u041e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u0441\u043b\u0443\u0447\u0430\u0439 priority inversion \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0443 \u0443\u0437\u043a\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0437\u0430\u0434\u0430\u0447, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0422\u0430\u043a\u0436\u0435, \u043e\u0431\u044b\u0447\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043c\u043e\u0433\u0430\u0442\u044c \u043f\u0440\u0435\u0444\u0435\u0442\u0447\u0435\u0440\u044b. \u041e\u043d\u0438 \u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u0442\u0435\u0441\u0442\u0435 \u043b\u0438\u0448\u044c \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u044f \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u043b \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043f\u043e \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u0430\u0434\u0440\u0435\u0441\u0430\u043c.<\/p>\n<p>  \u0423\u0444\u0444! \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0442\u0435\u043a\u0441\u0442, \u0441\u0443\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u0442\u0432\u0438\u0442: \u201cWhen a cache line is evicted from LLC, the same cache line is evicted from L1 and\/or L2. So warming up cache could be useful. \u201d    \t \t\t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/company\/intel\/blog\/173001\/\"> http:\/\/habrahabr.ru\/company\/intel\/blog\/173001\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0423 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b Core i7 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439, \u043d\u043e \u043e\u0442\u0447\u0435\u0433\u043e-\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0434\u0430\u0436\u0435 \u0441\u0440\u0435\u0434\u0438 \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u0432 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 priority inversion. \u0415\u0433\u043e \u044f \u043e\u043f\u0438\u0448\u0443 \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435. \u0412 \u043d\u0435\u043c \u0435\u0441\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 \u0421, \u0442\u0440\u0438 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u044b, \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u044d\u0448\u0435\u0439 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b Core i7. \u041d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u043e\u043a\u0440\u043e\u0432\u043e\u0432 \u043d\u0435 \u0441\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0432\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0434\u0430\u0432\u043d\u043e \u043e\u0431\u0449\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430.<\/p>\n<p>  <a href=\"http:\/\/en.wikipedia.org\/wiki\/Priority_inversion\">Priority inversion<\/a> \u2013 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u043d\u0438\u0437\u043a\u043e\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u043c\u0435\u0434\u043b\u044f\u0442\u044c \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u044b\u0439. \u041e\u0431\u044b\u0447\u043d\u043e \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0443 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u043d\u0430 \u044f\u0434\u0440\u0435 \u0434\u043b\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0438\u0437\u043a\u043e\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u043e\u0433\u043e. \u0421 \u044d\u0442\u0438\u043c \u0434\u043e\u043b\u0436\u043d\u043e \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u044f\u0434\u0440\u043e \u041e\u0421. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u043c\u0438\u043c\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u044f\u0434\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c affinity \u0438 MSI-X, \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0435 \u0435\u0441\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u043e\u0431\u0449\u0438\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0437\u0430\u0434\u0430\u0447 \u2013 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043f\u0430\u043c\u044f\u0442\u0438, QPI, \u043e\u0431\u0449\u0438\u0439 \u043a\u044d\u0448 \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f, PCIe \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0412 \u0432\u043e\u043f\u0440\u043e\u0441\u044b PCIe \u044f \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0443, \u0442.\u043a. \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0441\u044c \u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u043c \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u0435. Priority inversion \u043d\u0430 \u043f\u043e\u0447\u0432\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 QPI \u044f \u0434\u0430\u0432\u043d\u043e \u043d\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u043b \u2013 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u043d\u043e\u0433\u043e\u043a\u0430\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u044b\u043c, \u0438 \u043d\u0438\u0437\u043a\u043e\u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u044b\u043c \u0437\u0430\u0434\u0430\u0447\u0430\u043c. \u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u044e\u0441\u044c \u043d\u0430 \u043a\u044d\u0448\u0430\u0445.   <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-173001","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/173001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=173001"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/173001\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=173001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=173001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=173001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}