锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久99亚洲网美利坚合众国,亚洲欧美国产精品专区久久,久久久久久午夜成人影院 http://www.shnenglu.com/polly-yang/category/16832.htmlzh-cnMon, 30 Jul 2012 11:57:12 GMTMon, 30 Jul 2012 11:57:12 GMT60vs + opencv 甯歌閿欒http://www.shnenglu.com/polly-yang/archive/2012/07/30/185613.htmlpollypollyMon, 30 Jul 2012 03:57:00 GMThttp://www.shnenglu.com/polly-yang/archive/2012/07/30/185613.htmlhttp://www.shnenglu.com/polly-yang/comments/185613.htmlhttp://www.shnenglu.com/polly-yang/archive/2012/07/30/185613.html#Feedback0http://www.shnenglu.com/polly-yang/comments/commentRss/185613.htmlhttp://www.shnenglu.com/polly-yang/services/trackbacks/185613.htmlA:搴斿皢瑙e喅鏂規(guī)騫沖彴鏀逛負(fù)win64銆?br />宸ュ叿鏍忎笂鏂圭殑瑙e喅鏂規(guī)騫沖彴—銆嬬偣鍑諱笅鎷夎彍鍗?#8212;銆嬮厤緗鐞嗗櫒—銆嬫椿鍔ㄨВ鍐蟲柟妗堝鉤鍙?#8212;銆嬫柊寤?#8212;銆嬮敭鍏ヨ幏閫夌潃鏂板鉤鍙?#8212;銆媥64
闂灝辮В鍐沖暒錛佸搱鍝堬紒



Q錛欵rror C1189 Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]
A:Go to the project properties (Project menu, Properties).  Set 'Use of MFC' to "Use MFC in a Shared DLL".  You have to make this change for both the debug and release configurations

polly 2012-07-30 11:57 鍙戣〃璇勮
]]>
CString 銆?string 銆?const char*銆乮nt銆乨ouble涔嬮棿鐨勭浉浜掕漿鎹?/title><link>http://www.shnenglu.com/polly-yang/archive/2012/07/24/184890.html</link><dc:creator>polly</dc:creator><author>polly</author><pubDate>Tue, 24 Jul 2012 12:34:00 GMT</pubDate><guid>http://www.shnenglu.com/polly-yang/archive/2012/07/24/184890.html</guid><wfw:comment>http://www.shnenglu.com/polly-yang/comments/184890.html</wfw:comment><comments>http://www.shnenglu.com/polly-yang/archive/2012/07/24/184890.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/polly-yang/comments/commentRss/184890.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/polly-yang/services/trackbacks/184890.html</trackback:ping><description><![CDATA[<p><span style="font-family: Times New Roman; font-size: 14pt">鎴戜滑鍦ㄥ啓紼嬪簭鏃訛紝甯稿父浼?xì)閬囧埌绫诲瀷铦{鎹㈢殑闂銆傜幇鎬葷粨涓浜涘父瑙佺殑綾誨瀷杞崲銆?/span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">1錛宑onst char*錛圕椋庢牸瀛楃涓詫級(jí)涓巗tring涔嬮棿杞崲錛?/span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">             錛?錛?const char*鍙互鐩存帴瀵箂tring綾誨瀷璧嬪鹼紝渚嬪錛?/span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">                       const char* pchar = "qwerasdf";</span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">                       stringstr = pchar;</span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">             錛?錛?string閫氳繃c_str()鍑芥暟杞崲涓篊椋庢牸瀛楃涓詫紝渚嬪錛?/span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">                       string str = "qwerasdf";</span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">                       const char* pchar = str.c_str();</span></p> <p><span style="font-size: 18px"></span> </p> <p><span style="font-family: Times New Roman; font-size: 14pt">2錛宑onst char*綾誨瀷鍙互鐩存帴緇機(jī)String綾誨瀷璧嬪鹼紝渚嬪錛?/span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">               const char* pchar = "qwerasdf";</span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">               CString str = pchar;</span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">3錛宻tring綾誨瀷鍙橀噺杞負(fù)涓篊string綾誨瀷鍙橀噺</span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">             CString綾誨瀷鍙橀噺鍙互鐩存帴緇檚tring綾誨瀷鍙橀噺璧嬪鹼紝浣嗘槸string綾誨瀷涓嶈兘瀵笴String綾誨瀷鐩存帴璧嬪箋傞氳繃鍓嶄袱綾?/span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">      杞崲鎴戜滑鍙互寰楀埌錛?/span><span style="font-family: Times New Roman; font-size: 14pt">string綾誨瀷鍙橀噺杞崲涓篶onst char*綾誨瀷錛岀劧鍚庡啀鐩存帴璧嬪煎氨鍙互浜?jiǎn)銆備緥濡傦細(xì)</span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">       CString cstr錛?/span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">       sring str = “asdasd”錛?/span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">       cstr = str.c_str();</span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">      鍚岀悊錛孋Strng綾誨瀷鍙橀噺鍏堣漿鎹負(fù)string綾誨瀷鍦ㄨ皟鐢╟_str()鍑芥暟灝卞彲浠ュ畬鎴愬悜</span><span style="font-family: Times New Roman; font-size: 14pt">const char*綾誨瀷鐨勮漿鎹€備緥濡傦細(xì)</span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">      CString cStr = "adsad";</span><span style="font-size: 18px">   </span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">      string str = cStr;  </span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">      const char* pchar = str.c_str();<br /></span><span style="font-family: Times New Roman; font-size: 14pt">4錛宒ouble錛宨nt杞瑂tring<br /></span></p> <p><span style="font-size: 18px"></span>      <span style="font-family: Times New Roman; font-size: 14pt">double temp;</span><br />   <span style="font-family: Times New Roman; font-size: 14pt">stringstream strStream;</span><br />   <span style="font-family: Times New Roman; font-size: 14pt">strStream<<temp;</span><br />   <span style="font-family: Times New Roman; font-size: 14pt">string ss = strStream.str()</span> <br /><br /><span style="font-family: Times New Roman; font-size: 14pt">   string 杞琩ouble錛宨nt </span><br /><span style="font-family: Times New Roman; font-size: 14pt">   string.atoi   ,   string.atof</span></p> <p><span style="font-family: Times New Roman; font-size: 14pt">     浠庝笂闈㈡垜浠彲浠ヤ笂闈㈢湅鍑猴紝閫氳繃綾誨瀷涔嬮棿鐨勭浉浜掕漿鍖栵紝浼?xì)鋴涉湰鏉ヨ閫氳繃澶嶆潅鐨勫嚱鏁版潵瀹屾垚鐨勭被鍨嬭漿鎹㈠彉寰楃畝鍗曟槗鎳傘?/span></p><img src ="http://www.shnenglu.com/polly-yang/aggbug/184890.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/polly-yang/" target="_blank">polly</a> 2012-07-24 20:34 <a href="http://www.shnenglu.com/polly-yang/archive/2012/07/24/184890.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>涓涓鏄撲笂鎵嬬殑XML瑙f瀽鍣═inyXmlhttp://www.shnenglu.com/polly-yang/archive/2012/07/24/184820.htmlpollypollyTue, 24 Jul 2012 00:17:00 GMThttp://www.shnenglu.com/polly-yang/archive/2012/07/24/184820.htmlhttp://www.shnenglu.com/polly-yang/comments/184820.htmlhttp://www.shnenglu.com/polly-yang/archive/2012/07/24/184820.html#Feedback0http://www.shnenglu.com/polly-yang/comments/commentRss/184820.htmlhttp://www.shnenglu.com/polly-yang/services/trackbacks/184820.html璇誨彇鍜岃緗?/span>xml閰嶇疆鏂囦歡鏄渶甯哥敤鐨勬搷浣滐紝璇曠敤浜?jiǎn)鍑犱?/span>C++鐨?/span>XML瑙f瀽鍣紝涓漢鎰熻TinyXML鏄嬌鐢ㄨ搗鏉ユ渶鑸掓湇鐨勶紝鍥犱負(fù)瀹冪殑API鎺ュ彛鍜?/span>Java鐨勫崄鍒嗙被浼鹼紝闈㈠悜瀵硅薄鎬у緢濂姐?/span>

TinyXML鏄竴涓紑婧愮殑瑙f瀽XML鐨勮В鏋愬簱錛岃兘澶熺敤浜?/span>C++錛岃兘澶熷湪Windows鎴?/span>Linux涓紪璇戙傝繖涓В鏋愬簱鐨勬ā鍨嬮氳繃瑙f瀽XML鏂囦歡錛岀劧鍚庡湪鍐呭瓨涓敓鎴?/span>DOM妯″瀷錛屼粠鑰岃鎴戜滑寰堟柟渚跨殑閬嶅巻榪欐5XML鏍?wèi)銆?/span>

DOM妯″瀷鍗蟲枃妗e璞℃ā鍨嬶紝鏄皢鏁翠釜鏂囨。鍒嗘垚澶氫釜鍏冪礌錛堝涔︺佺珷銆佽妭銆佹絳夛級(jí)錛屽茍鍒╃敤鏍?wèi)鍨嬀l撴瀯琛ㄧず榪欎簺鍏冪礌涔嬮棿鐨勯『搴忓叧緋諱互鍙?qiáng)宓屽鍖呭惈鍏尘p匯?br />    涓嶈繃TinyXml闇瑕佷嬌鐢ㄨ呮墜鍔ㄩ噴鏀緉ew鍑虹殑鍐呭瓨銆傚垵瀛++鑰呭線寰瀹規(guī)槗閫犳垚鍐呭瓨娉勯湶銆?/span>



polly 2012-07-24 08:17 鍙戣〃璇勮
]]>
GetWindowRect涓嶨etClientRect鐨勫尯鍒?/title><link>http://www.shnenglu.com/polly-yang/archive/2012/02/13/165507.html</link><dc:creator>polly</dc:creator><author>polly</author><pubDate>Mon, 13 Feb 2012 12:01:00 GMT</pubDate><guid>http://www.shnenglu.com/polly-yang/archive/2012/02/13/165507.html</guid><wfw:comment>http://www.shnenglu.com/polly-yang/comments/165507.html</wfw:comment><comments>http://www.shnenglu.com/polly-yang/archive/2012/02/13/165507.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/polly-yang/comments/commentRss/165507.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/polly-yang/services/trackbacks/165507.html</trackback:ping><description><![CDATA[<p><font color="#0000ff">鍏堣皟鐢℅etWindowRect鍚庡啀璋冪敤ScreenToClient,榪欎釜鏃跺欏緱鍒扮殑rect鍜岀洿鎺ヤ嬌鐢℅etClientRect寰楀埌鐨勫兼槸鐩哥瓑鐨勩傛湁鏃跺欓渶瑕佽幏寰楃獥鍙g煩褰㈢殑澶у皬鍜屽鎴峰尯鐭╁艦鐨勫ぇ灝忎簩鑰呯殑鍊鹼紝鏁呴渶瑕佸垎鍒皟鐢℅etWindowRect鍜孏etClientRect銆傚鏋滃彧闇瑕佽幏寰楀鎴峰尯鐭╁艦鐨勫ぇ灝忥紝璋冪敤GetClientRect灝辮浜?jiǎn)銆?font size="3">GetWindowRect</font>鍜孏etClientRect鍑芥暟鐨勮鏄庡涓嬶細(xì)</font></p> <p><strong>CWnd::GetClientRect</strong> <wbr> <wbr><br /> <wbr> <wbr> <wbr> void GetClientRect( LPRECT lpRect ) const;<br /><em><strong>Parameters:</strong><br />lpRect<br /></em> <wbr> <wbr> <wbr> Points to a RECT structure or a CRect object to receive the client coordinates. The left and top members will be 0. The right and bottom members will contain the width and height of the window.<br /><em>Remarks:</em><br /> <wbr> <wbr> <wbr> Copies the client coordinates of the CWnd client area into the structure pointed to by lpRect. The client coordinates specify the upper-left and lower-right corners of the client area. Since client coordinates are relative to the upper-left corners of the CWnd client area, the coordinates of the upper-left corner are (0,0).</p> <p><strong>CWnd::GetWindowRect</strong><br />void GetWindowRect( LPRECT lpRect ) const;<br /><em>Parameters:</em><br /><em>lpRect</em><br />Points to a CRect object or a RECT structure that will receive the screen coordinates of the upper-left and lower-right corners.<br /><em><strong>Remarks:</strong></em><br />Copies the dimensions of the bounding rectangle of the CWnd object to the structure pointed to by lpRect. The dimensions are given in screen coordinates relative to the upper-left corner of the display screen. The dimensions of the caption, border, and scroll bars, if present, are included.</p> <p><font color="#ff0000">GetWindowRect() 寰楀埌鐨勬槸鍦ㄥ睆騫曞潗鏍囩郴涓嬬殑RECT錛涳紙<font color="#800000">鍗充互灞忓箷宸︿笂瑙掍負(fù)鍘熺偣</font>錛?br />GetClientRect() 寰楀埌鐨勬槸鍦ㄥ鎴峰尯鍧愭爣緋諱笅鐨凴ECT錛?錛?font color="#800000">鍗充互鎵鍦ㄧ獥鍙e乏涓婅涓哄師鐐?/font>錛?br /><br />GetWindowRect()鍙栫殑鏄暣涓獥鍙g殑鐭╁艦錛?br />GetClientRect()鍙栫殑浠呮槸瀹㈡埛鍖虹殑鐭╁艦錛屼篃灝辨槸璇翠笉鍖呮嫭鏍囬鏍忥紝澶栨絳夛紱</font></p> <p><font color="#ff0000">絎竴涓嚱鏁拌幏寰楃殑鏄獥鍙e湪灞忓箷涓婄殑浣嶇疆錛屽緱鍒扮殑緇撴灉鍙兘鏄繖鏍稢Rect(10,10,240,240);<br />絎簩涓嚱鏁板拰瀹冧笉鍚岋紝瀹冨彧鑾峰緱浜?jiǎn)瀹㈡埛鍖虹殑澶畯锛屽洜姝ゅ緱鍒扮殑缁撴灉鎬繪槸榪欐牱CRect(0,0,width,height);</font></p> <p><font color="#ff0000">ScreenToClient() 灝辨槸鎶婂睆騫曞潗鏍囩郴涓嬬殑RECT鍧愭爣杞崲涓哄鎴峰尯鍧愭爣緋諱笅鐨凴ECT鍧愭爣銆?/font></p> <p><font color="#3366ff"><font color="#0000ff">The GetClientRect function retrieves the coordinates of a window's client area. The client coordinates specify the upper-left and lower-right corners of the client area. Because client coordinates are relative to the upper-left corner of a window's client area, the coordinates of the upper-left corner are (0,0).</font></font></p> <p><font color="#ff0000">GetClientRect寰楀埌鐨勬槸瀹㈡埛鍖虹殑澶у皬錛屼篃灝辨槸璇磋繖鏍峰緱鍒扮殑宸︿笂瑙掓案榪滄槸錛?錛?錛?/font></p> <p><font color="#0000ff">The GetWindowRect function retrieves the dimensions of the bounding rectangle of the specified window. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.</font></p> <p><font color="#ff0000">GetWindowRect 鏄獥鍙g浉瀵逛簬鏁翠釜灞忓箷鐨勫潗鏍囷紝灞忓箷宸︿笂鐐逛負(fù)0錛?</font></p> <p><font color="#ff0000">鐩鎬簰杞寲鐢⊿creenToClient 鎴栬?ClientToScreen</font></p> <p><strong>ClientToScreen</strong><br />The ClientToScreen function converts the client coordinates of a specified point to screen coordinates.<br /><em>BOOL ClientToScreen(<br /> <wbr> <wbr> HWND hWnd, <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> // window handle for source coordinates<br /> <wbr> <wbr> LPPOINT lpPoint <wbr> <wbr> // pointer to structure containing screen coordinates<br />);</em><br /><em><strong>Parameters</strong></em><br /><em>hWnd</em><br />Handle to the window whose client area is used for the conversion.<br /><em>lpPoint<br /></em>Pointer to a POINT structure that contains the client coordinates to be converted. The new screen coordinates are copied into this structure if the function succeeds.<br /><em><strong>Return Values</strong></em><br />If the function succeeds, the return value is nonzero.<br /><font color="#3366ff"><font color="#000000">If the function fails, the return value is zero.<br /></font></font><font color="#3366ff"><font color="#0000ff">铏界劧瀛樺湪璋冪敤GetWindowRect鍚庡啀璋冪敤ScreenToClient==GetClientRect錛屼絾ScreenToClient錛堬級(jí)鍜孋lientToScreen()涓よ呴兘鏄睘浜嶹INDOWS API鍑芥暟錛屽彲鑳芥槸瀛樺湪涓瀹氱殑鍐椾綑璁捐錛屼絾鎰忎箟涓嶅悓銆?br />涓嶈繃鍦?Net Framework涓嬪WINDOWS API鍑芥暟榪涜浜?jiǎn)閲嶆柊鏁寸悊鍜屼紭鍖栧Q屽湪鑾峰彇鎺т歡鎴栫獥鍙g殑灞忓箷鍧愭爣鍜屽鎴峰尯鍧愭爣鏃舵洿鏂逛究鐨勫錛屽彧闇瑕佸緱鍒頒笌鎺т歡鎴栫獥鍙g浉瀵瑰簲灞忓箷鍧愭爣鍜屽鎴峰尯鍧愭爣灞炴у煎氨鍙互浜?/font>銆?/font></p><font color="#7c7c7c"><strong>ScreenToClient</strong><br />The ScreenToClient function converts the screen coordinates of a specified point on the screen to client coordinates.<br /></font><font color="#7c7c7c"><em>BOOL ScreenToClient(<br /> <wbr> <wbr> HWND hWnd, <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> <wbr> // window handle for source coordinates<br /> <wbr> <wbr> LPPOINT lpPoint <wbr> <wbr> <wbr> // address of structure containing coordinates<br />);<br /></em><em><strong>Parameters錛?/strong></em><br /></font><font color="#7c7c7c"><em>hWnd<br /></em>Handle to the window whose client area will be used for the conversion.<br /></font><font color="#7c7c7c"><em>lpPoint<br /></em>Pointer to a POINT structure that contains the screen coordinates to be converted.<br /></font><font color="#7c7c7c"><em><strong>Return Values錛?br /></strong></em>If the function succeeds, the return value is nonzero.<br />If the function fails, the return value is zero.</font><img src ="http://www.shnenglu.com/polly-yang/aggbug/165507.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/polly-yang/" target="_blank">polly</a> 2012-02-13 20:01 <a href="http://www.shnenglu.com/polly-yang/archive/2012/02/13/165507.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍥懼儚緙栬緫http://www.shnenglu.com/polly-yang/archive/2011/10/28/159258.htmlpollypollyFri, 28 Oct 2011 02:08:00 GMThttp://www.shnenglu.com/polly-yang/archive/2011/10/28/159258.htmlhttp://www.shnenglu.com/polly-yang/comments/159258.htmlhttp://www.shnenglu.com/polly-yang/archive/2011/10/28/159258.html#Feedback0http://www.shnenglu.com/polly-yang/comments/commentRss/159258.htmlhttp://www.shnenglu.com/polly-yang/services/trackbacks/159258.html
Pen pen(Color::Black);
int width = abs(m_vecPoint[1].X - m_vecPoint[0].X);
int height = abs(m_vecPoint[1].Y - m_vecPoint[0].Y);
if (width<0||height<0)
{
graphic.DrawRectangle(&pen,m_vecPoint[1].X,m_vecPoint[1].Y,width,height);
}
else{
graphic.DrawRectangle(&pen,m_vecPoint[0].X,m_vecPoint[0].Y,width,height);
}


polly 2011-10-28 10:08 鍙戣〃璇勮
]]>
MFC涔?:鍦ㄨ鍥句腑鎵撳紑鍥劇墖http://www.shnenglu.com/polly-yang/archive/2011/05/29/147629.htmlpollypollySun, 29 May 2011 08:54:00 GMThttp://www.shnenglu.com/polly-yang/archive/2011/05/29/147629.htmlhttp://www.shnenglu.com/polly-yang/comments/147629.htmlhttp://www.shnenglu.com/polly-yang/archive/2011/05/29/147629.html#Feedback0http://www.shnenglu.com/polly-yang/comments/commentRss/147629.htmlhttp://www.shnenglu.com/polly-yang/services/trackbacks/147629.html1//璋冪敤浣嶅浘,鎵ц紼嬪簭鏃舵墦寮鍥劇墖
2    CDC memdc;
3    CBitmap *olddc;
4    CBitmap bitmap;
5    bitmap.LoadBitmap(IDB_BITMAP1);
6    pDC=this->GetDC();
7    memdc.CreateCompatibleDC(pDC);
8    olddc=memdc.SelectObject(&bitmap);
9    pDC->BitBlt(0,0,rect.Width(),rect.Height(),&memdc,0,0,SRCCOPY);褰撶劧錛屽厛鍏嶄笉浜?jiǎn)璁揪|潗鏍囩郴銆?img src ="http://www.shnenglu.com/polly-yang/aggbug/147629.html" width = "1" height = "1" />

polly 2011-05-29 16:54 鍙戣〃璇勮
]]>
MFC紼嬪簭涔?錛欸DI鐢誨浘鍏ラ棬涔?闅忔満鐐?BitBlt()+CPenhttp://www.shnenglu.com/polly-yang/archive/2011/05/26/147303.htmlpollypollyThu, 26 May 2011 14:43:00 GMThttp://www.shnenglu.com/polly-yang/archive/2011/05/26/147303.htmlhttp://www.shnenglu.com/polly-yang/comments/147303.htmlhttp://www.shnenglu.com/polly-yang/archive/2011/05/26/147303.html#Feedback0http://www.shnenglu.com/polly-yang/comments/commentRss/147303.htmlhttp://www.shnenglu.com/polly-yang/services/trackbacks/147303.html
鏍稿績(jī)浠g爜濡備笅

 1// TODO: 鍦ㄦ澶勪負(fù)鏈満鏁版嵁娣誨姞緇樺埗浠g爜
 2    CRect rect;
 3    GetClientRect(&rect);
 4
 5    pDC->SetMapMode(MM_ANISOTROPIC);
 6    pDC->SetWindowExt(100100);//紿楀彛閫昏緫澶у皬錛?000*1000,
 7    pDC->SetViewportExt(100-100);//鏀瑰彉Y鍧愭爣鏂瑰悜--viewport浣跨敤鐗╃悊澶у皬
 8    pDC->SetViewportOrg(rect.left, rect.bottom);//璁劇疆紿楀彛涓績(jī)鐐逛負(fù)鍧愭爣緋誨師鐐?-Viewport浣跨敤鐗╃悊澶у皬 
 9    CPen PenNew(PS_GEOMETRIC,10,RGB(255,0,0));
10    CPen* pPenOld;
11    pPenOld=pDC->SelectObject(&PenNew);
12    srand((unsigned) time(NULL)); /*鎾瀛?/span>*/
13    pDC->MoveTo(50,50);
14    //pDC->LineTo(100,100);
15    for (int i=0;i<5;i++){
16        int x=rand()%500;
17        int y=rand()%500;
18        pDC->LineTo(x,y);
19        pDC->BitBlt(x,y,25,25,NULL,0,0,BLACKNESS);
20
21    }

22    pDC->SelectObject(pPenOld);
23    PenNew.DeleteObject();

錛?/p>

polly 2011-05-26 22:43 鍙戣〃璇勮
]]>
MFC紼嬪簭涔? 涓漢鎵寰楃◣璁$畻鍣?/title><link>http://www.shnenglu.com/polly-yang/archive/2011/05/24/147063.html</link><dc:creator>polly</dc:creator><author>polly</author><pubDate>Tue, 24 May 2011 15:15:00 GMT</pubDate><guid>http://www.shnenglu.com/polly-yang/archive/2011/05/24/147063.html</guid><wfw:comment>http://www.shnenglu.com/polly-yang/comments/147063.html</wfw:comment><comments>http://www.shnenglu.com/polly-yang/archive/2011/05/24/147063.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/polly-yang/comments/commentRss/147063.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/polly-yang/services/trackbacks/147063.html</trackback:ping><description><![CDATA[<img border="0" alt="" src="http://www.shnenglu.com/images/cppblog_com/polly-yang/鏈懡鍚?jpg" width="564" longdesc="" height="383" /> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #008080"> 1</span><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" /><span style="color: #0000ff">void</span><span style="color: #000000">  Cpaytax2Dlg::OnEnChangeEdit1()<br /></span><span style="color: #008080"> 2</span><span style="color: #000000"><img id="Codehighlighter1_37_386_Open_Image" onclick="this.style.display='none'; Codehighlighter1_37_386_Open_Text.style.display='none'; Codehighlighter1_37_386_Closed_Image.style.display='inline'; Codehighlighter1_37_386_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_37_386_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_37_386_Closed_Text.style.display='none'; Codehighlighter1_37_386_Open_Image.style.display='inline'; Codehighlighter1_37_386_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_37_386_Closed_Text"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_37_386_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080"> 3</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #008000">//</span><span style="color: #008000"> TODO:  濡傛灉璇ユ帶浠舵槸 RICHEDIT 鎺т歡錛屽垯瀹冨皢涓嶄細(xì)<br /></span><span style="color: #008080"> 4</span><span style="color: #008000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #008000">//</span><span style="color: #008000"> 鍙戦佽閫氱煡錛岄櫎闈為噸鍐?nbsp;CDialog::OnInitDialog()<br /></span><span style="color: #008080"> 5</span><span style="color: #008000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #008000">//</span><span style="color: #008000"> 鍑芥暟騫惰皟鐢?nbsp;CRichEditCtrl().SetEventMask()錛?br /></span><span style="color: #008080"> 6</span><span style="color: #008000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #008000">//</span><span style="color: #008000"> 鍚屾椂灝?nbsp;ENM_CHANGE 鏍囧織“鎴?#8221;榪愮畻鍒版帺鐮佷腑銆?br /></span><span style="color: #008080"> 7</span><span style="color: #008000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" /><br /></span><span style="color: #008080"> 8</span><span style="color: #008000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #008000">//</span><span style="color: #008000"> TODO:  鍦ㄦ娣誨姞鎺т歡閫氱煡澶勭悊紼嬪簭浠g爜</span><span style="color: #008000"><br /></span><span style="color: #008080"> 9</span><span style="color: #008000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #000000">    CEdit </span><span style="color: #000000">*</span><span style="color: #000000">wEdit1;<br /></span><span style="color: #008080">10</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" />    wEdit1</span><span style="color: #000000">=</span><span style="color: #000000">(CEdit</span><span style="color: #000000">*</span><span style="color: #000000">)GetDlgItem(IDC_EDIT1);<br /></span><span style="color: #008080">11</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #008000">//</span><span style="color: #008000">wEdit1->SetWindowText( "FOO" );<br /></span><span style="color: #008080">12</span><span style="color: #008000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #008000">//</span><span style="color: #008000">鍙栧?/span><span style="color: #008000"><br /></span><span style="color: #008080">13</span><span style="color: #008000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #000000">    CString str;<br /></span><span style="color: #008080">14</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" />    GetDlgItem(IDC_EDIT1)</span><span style="color: #000000">-></span><span style="color: #000000">GetWindowText(str);<br /></span><span style="color: #008080">15</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" />    temp</span><span style="color: #000000">=</span><span style="color: #000000">atof(str);<br /></span><span style="color: #008080">16</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />}</span></span><span style="color: #000000"><br /></span><span style="color: #008080">17</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" /><br /></span><span style="color: #008080">18</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #0000ff">void</span><span style="color: #000000"> Cpaytax2Dlg::OnBnClickedOk()<br /></span><span style="color: #008080">19</span><span style="color: #000000"><img id="Codehighlighter1_423_749_Open_Image" onclick="this.style.display='none'; Codehighlighter1_423_749_Open_Text.style.display='none'; Codehighlighter1_423_749_Closed_Image.style.display='inline'; Codehighlighter1_423_749_Closed_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none" id="Codehighlighter1_423_749_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_423_749_Closed_Text.style.display='none'; Codehighlighter1_423_749_Open_Image.style.display='inline'; Codehighlighter1_423_749_Open_Text.style.display='inline';" align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_423_749_Closed_Text"><img src="http://www.shnenglu.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_423_749_Open_Text"><span style="color: #000000">{<br /></span><span style="color: #008080">20</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #008000">//</span><span style="color: #008000"> TODO: 鍦ㄦ娣誨姞鎺т歡閫氱煡澶勭悊紼嬪簭浠g爜</span><span style="color: #008000"><br /></span><span style="color: #008080">21</span><span style="color: #008000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #000000">    UpdateData(TRUE);<br /></span><span style="color: #008080">22</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" />    PayTax paytax(temp);<br /></span><span style="color: #008080">23</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" />    temp2</span><span style="color: #000000">=</span><span style="color: #000000">paytax.calculate();<br /></span><span style="color: #008080">24</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #008000">//<br /></span><span style="color: #008080">25</span><span style="color: #008000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #000000">    UpdateData(FALSE);<br /></span><span style="color: #008080">26</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" />    GetDlgItem(IDC_EDIT1)</span><span style="color: #000000">-></span><span style="color: #000000">SetFocus();<br /></span><span style="color: #008080">27</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" />    ((CEdit </span><span style="color: #000000">*</span><span style="color: #000000">)GetDlgItem(IDC_EDIT1))</span><span style="color: #000000">-></span><span style="color: #000000">SetSel(</span><span style="color: #000000">0</span><span style="color: #000000">,</span><span style="color: #000000">-</span><span style="color: #000000">1</span><span style="color: #000000">,TRUE);<br /></span><span style="color: #008080">28</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" /><br /></span><span style="color: #008080">29</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" />    UpdateData(FALSE);<br /></span><span style="color: #008080">30</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" />    CString str;<br /></span><span style="color: #008080">31</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" />    str.Format(</span><span style="color: #000000">"</span><span style="color: #000000">%f</span><span style="color: #000000">"</span><span style="color: #000000">,temp2);<br /></span><span style="color: #008080">32</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" />    GetDlgItem(IDC_EDIT2)</span><span style="color: #000000">-></span><span style="color: #000000">SetWindowText(str); <br /></span><span style="color: #008080">33</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #008000">//</span><span style="color: #008000">OnOK();</span><span style="color: #008000"><br /></span><span style="color: #008080">34</span><span style="color: #008000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #000000"><br /></span><span style="color: #008080">35</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />}</span></span><span style="color: #000000"><br /></span><span style="color: #008080">36</span><span style="color: #000000"><img align="top" src="http://www.shnenglu.com/images/OutliningIndicators/None.gif" alt="" /></span></div> <img src ="http://www.shnenglu.com/polly-yang/aggbug/147063.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/polly-yang/" target="_blank">polly</a> 2011-05-24 23:15 <a href="http://www.shnenglu.com/polly-yang/archive/2011/05/24/147063.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>20110518 linux涓璉O璋冨害綆楁硶灝忕粨http://www.shnenglu.com/polly-yang/archive/2011/05/18/146683.htmlpollypollyWed, 18 May 2011 10:32:00 GMThttp://www.shnenglu.com/polly-yang/archive/2011/05/18/146683.htmlhttp://www.shnenglu.com/polly-yang/comments/146683.htmlhttp://www.shnenglu.com/polly-yang/archive/2011/05/18/146683.html#Feedback0http://www.shnenglu.com/polly-yang/comments/commentRss/146683.htmlhttp://www.shnenglu.com/polly-yang/services/trackbacks/146683.html鍦↙inux 2.6涓?鏈夊洓縐嶅叧浜嶪O鐨勮皟搴︾畻娉?涓嬮潰緇煎悎灝忕粨涓涓?

1) NOOP

NOOP綆楁硶鐨勫叏鍐欎負(fù)No Operation銆傝綆楁硶瀹炵幇浜?jiǎn)鏈鏈綆鍗曠殑FIFO闃熷垪錛屾墍鏈塈O璇鋒眰澶ц嚧鎸夌収鍏堟潵鍚庡埌鐨勯『搴忚繘琛屾搷浣溿備箣鎵浠ヨ“澶ц嚧”錛?/p>

鍘熷洜鏄疦OOP鍦‵IFO鐨勫熀紜涓婅繕鍋氫簡(jiǎn)鐩擱偦IO璇鋒眰鐨勫悎騫訛紝騫朵笉鏄畬瀹屽叏鍏ㄦ寜鐓у厛榪涘厛鍑虹殑瑙勫垯婊¤凍IO璇鋒眰銆侼OOP鍋囧畾I/O璇鋒眰鐢遍┍鍔ㄧ▼搴忔垨鑰呰

澶囧仛浜?jiǎn)浼樺寲鎴栬呴噸鎺掍簡(jiǎn)欏哄簭(灝卞儚涓涓櫤鑳芥帶鍒跺櫒瀹屾垚鐨勫伐浣滈偅鏍?銆傚湪鏈変簺SAN鐜涓嬶紝榪欎釜閫夋嫨鍙兘鏄渶濂介夋嫨銆侼oop 瀵逛簬 IO 涓嶉偅涔堟搷

蹇?jī)锛屽?guī)墍鏈夌殑 IO璇鋒眰閮界敤 FIFO 闃熷垪褰㈠紡澶勭悊錛岄粯璁よ涓?IO 涓嶄細(xì)瀛樺湪鎬ц兘闂銆傝繖涔熶嬌寰?CPU 涔熶笉鐢ㄩ偅涔堟搷蹇?jī)銆?a >www.linuxidc.com褰撶劧

錛屽浜庡鏉備竴鐐圭殑搴旂敤綾誨瀷錛屼嬌鐢ㄨ繖涓皟搴﹀櫒錛岀敤鎴瘋嚜宸卞氨浼?xì)闈炲父鎿嶅績(jī)銆?


2) Deadline scheduler

DEADLINE鍦–FQ鐨勫熀紜涓婏紝瑙e喅浜?jiǎn)IO璇鋒眰楗挎鐨勬瀬绔儏鍐點(diǎn)傞櫎浜?jiǎn)CFQ鏈韓鍏鋒湁鐨処O鎺掑簭闃熷垪涔嬪錛孌EADLINE棰濆鍒嗗埆涓鴻IO鍜屽啓IO鎻愪緵浜?jiǎn)FIFO

闃熷垪銆傝FIFO闃熷垪鐨勬渶澶х瓑寰呮椂闂翠負(fù)500ms錛屽啓FIFO闃熷垪鐨勬渶澶х瓑寰呮椂闂翠負(fù)5s銆侳IFO闃熷垪鍐呯殑IO璇鋒眰浼樺厛綰ц姣擟FQ闃熷垪涓殑楂橈紝錛岃岃FIFO

闃熷垪鐨勪紭鍏堢駭鍙堟瘮鍐橣IFO闃熷垪鐨勪紭鍏堢駭楂樸備紭鍏堢駭鍙互琛ㄧず濡備笅錛?

FIFO(Read) > FIFO(Write) > CFQ

deadline 綆楁硶淇濊瘉瀵逛簬鏃㈠畾鐨?IO 璇鋒眰浠ユ渶灝忕殑寤惰繜鏃墮棿錛屼粠榪欎竴鐐圭悊瑙o紝瀵逛簬 DSS 搴旂敤搴旇浼?xì)鏄緢閫傚悎鐨勩?/p>

3) Anticipatory scheduler

CFQ鍜孌EADLINE鑰冭檻鐨勭劍鐐瑰湪浜庢弧瓚抽浂鏁O璇鋒眰涓娿傚浜庤繛緇殑IO璇鋒眰錛屾瘮濡傞『搴忚錛屽茍娌℃湁鍋氫紭鍖栥備負(fù)浜?jiǎn)婊…懗闅忔満IO鍜岄『搴廔O娣峰悎鐨勫満鏅紝

Linux榪樻敮鎸丄NTICIPATORY璋冨害綆楁硶銆侫NTICIPATORY鐨勫湪DEADLINE鐨勫熀紜涓婏紝涓烘瘡涓IO閮借緗簡(jiǎn)6ms 鐨勭瓑寰呮椂闂寸獥鍙c傚鏋滃湪榪?ms鍐匫S鏀?/p>

鍒頒簡(jiǎn)鐩擱偦浣嶇疆鐨勮IO璇鋒眰錛屽氨鍙互绔嬪嵆婊¤凍

Anticipatory scheduler錛坅s) 鏇劇粡涓搴︽槸 Linux 2.6 Kernel 鐨?IO scheduler 銆侫nticipatory 鐨勪腑鏂囧惈涔夋槸”棰勬枡鐨? 棰勬兂鐨?#8221;, 榪欎釜

璇嶇殑紜彮紺轟簡(jiǎn)榪欎釜綆楁硶鐨勭壒鐐癸紝綆鍗曠殑璇達(dá)紝鏈変釜 IO 鍙戠敓鐨勬椂鍊欙紝濡傛灉鍙堟湁榪涚▼璇鋒眰 IO 鎿嶄綔錛屽垯灝嗕駭鐢熶竴涓粯璁ょ殑 6 姣鐚滄祴鏃墮棿錛岀寽嫻?/p>

涓嬩竴涓?榪涚▼璇鋒眰 IO 鏄騫蹭粈涔堢殑銆傝繖瀵逛簬闅忓嵆璇誨彇浼?xì)閫犳垚姣旇緝澶х殑寤舵椂錛屽鏁版嵁搴撳簲鐢ㄥ緢緋熺硶錛岃屽浜?Web Server 絳夊垯浼?xì)琛ㄧ幇鐨勪笉閿欍?/p>

榪欎釜綆楁硶涔熷彲浠ョ畝鍗曠悊瑙d負(fù)闈㈠悜浣庨熺鐩樼殑錛屽洜涓洪偅涓?#8221;鐚滄祴”瀹為檯涓婄殑鐩殑鏄負(fù)浜?jiǎn)鍑彏畱纾佸ご绉诲姩鏃堕棿銆?/p>

4錛塁FQ

CFQ綆楁硶鐨勫叏鍐欎負(fù)Completely Fair Queuing銆傝綆楁硶鐨勭壒鐐規(guī)槸鎸夌収IO璇鋒眰鐨勫湴鍧榪涜鎺掑簭錛岃屼笉鏄寜鐓у厛鏉ュ悗鍒扮殑欏哄簭鏉ヨ繘琛屽搷搴斻?

鍦ㄤ紶緇熺殑SAS鐩樹笂錛岀鐩樺閬撹姳鍘諱簡(jiǎn)緇濆ぇ澶氭暟鐨処O鍝嶅簲鏃墮棿銆侰FQ鐨勫嚭鍙戠偣鏄IO鍦板潃榪涜鎺掑簭錛屼互灝介噺灝戠殑紓佺洏鏃嬭漿嬈℃暟鏉ユ弧瓚沖敖鍙兘澶氱殑

IO璇鋒眰銆傚湪CFQ綆楁硶涓嬶紝SAS鐩樼殑鍚炲悙閲忓ぇ澶ф彁楂樹簡(jiǎn)銆備絾鏄浉姣斾簬NOOP鐨勭己鐐規(guī)槸錛屽厛鏉ョ殑IO璇鋒眰騫朵笉涓瀹氳兘琚弧瓚籌紝鍙兘浼?xì)鍑虹幇楗挎潥勬儏鍐点?

Completely Fair Queuing 錛坈fq, 瀹屽叏鍏鉤闃熷垪) 鍦?2.6.18 鍙栦唬浜?Anticipatory scheduler 鎴愪負(fù) Linux Kernel 榛樿鐨?IO scheduler

銆俢fq 瀵規(guī)瘡涓繘紼嬬淮鎶や竴涓?IO 闃熷垪錛屽悇涓繘紼嬪彂鏉ョ殑 IO 璇鋒眰浼?xì)琚?cfq 浠ヨ疆寰柟寮忓鐞嗐備篃灝辨槸瀵規(guī)瘡涓涓?IO 璇鋒眰閮芥槸鍏鉤鐨勩傝繖浣垮緱

cfq 寰堥傚悎紱繪暎璇葷殑搴旂敤(eg: OLTP DB)銆傛垜鎵鐭ラ亾鐨勪紒涓氱駭 Linux 鍙戣鐗堜腑錛孲USE Linux 濂藉儚鏄渶鍏堥粯璁ょ敤 cfq 鐨?

鏌ョ湅鍜屼慨鏀笽O璋冨害鍣ㄧ殑綆楁硶闈炲父綆鍗曘傚亣璁炬垜浠瀵箂da榪涜鎿嶄綔錛屽涓嬫墍紺猴細(xì)

cat /sys/block/sda/queue/scheduler

echo “cfq” > /sys/block/sda/queue/scheduler

鎬葷粨:

1 CFQ鍜孌EADLINE鑰冭檻鐨勭劍鐐瑰湪浜庢弧瓚抽浂鏁O璇鋒眰涓娿傚浜庤繛緇殑IO璇鋒眰錛屾瘮濡傞『搴忚錛屽茍娌℃湁鍋氫紭鍖栥備負(fù)浜?jiǎn)婊…懗闅忔満IO鍜岄『搴廔O娣峰悎鐨勫満鏅?/p>

錛孡inux榪樻敮鎸丄NTICIPATORY璋冨害綆楁硶銆侫NTICIPATORY鐨勫湪DEADLINE鐨勫熀紜涓婏紝涓烘瘡涓IO閮借緗簡(jiǎn)6ms鐨勭瓑寰呮椂闂寸獥鍙c傚鏋滃湪榪?ms鍐匫S鏀?/p>

鍒頒簡(jiǎn)鐩擱偦浣嶇疆鐨勮IO璇鋒眰錛屽氨鍙互绔嬪嵆婊¤凍銆?/p>

IO璋冨害鍣ㄧ畻娉曠殑閫夋嫨錛屾棦鍙栧喅浜庣‖浠剁壒寰侊紝涔熷彇鍐充簬搴旂敤鍦烘櫙銆?

鍦ㄤ紶緇熺殑SAS鐩樹笂錛孋FQ銆丏EADLINE銆丄NTICIPATORY閮芥槸涓嶉敊鐨勯夋嫨錛涘浜庝笓灞炵殑鏁版嵁搴撴湇鍔″櫒錛孌EADLINE鐨勫悶鍚愰噺鍜屽搷搴旀椂闂撮兘琛ㄧ幇鑹ソ銆?/p>

鐒惰屽湪鏂板叴鐨勫浐鎬佺‖鐩樻瘮濡係SD銆丗usion IO涓婏紝鏈綆鍗曠殑NOOP鍙嶈屽彲鑳芥槸鏈濂界殑綆楁硶錛屽洜涓哄叾浠栦笁涓畻娉曠殑浼樺寲鏄熀浜庣緝鐭閬撴椂闂寸殑錛岃?/p>

鍥烘佺‖鐩樻病鏈夋墍璋撶殑瀵婚亾鏃墮棿涓擨O鍝嶅簲鏃墮棿闈炲父鐭?/p>

2 瀵逛簬鏁版嵁搴撳簲鐢? Anticipatory Scheduler 鐨勮〃鐜版槸鏈宸殑銆侱eadline 鍦?DSS 鐜琛ㄧ幇姣?cfq 鏇村ソ涓鐐癸紝鑰?cfq 緇煎悎鏉ョ湅琛ㄧ幇鏇村ソ涓

浜涖傝繖涔熼毦鎬?RHEL 4 榛樿鐨?IO 璋冨害鍣ㄨ緗負(fù) cfq. 鑰?RHEL 4 姣?RHEL 3錛屾暣浣?IO 鏀硅繘榪樻槸涓嶅皬鐨勩?

 



polly 2011-05-18 18:32 鍙戣〃璇勮
]]>
20110518 妯″紡璇嗗埆-榪戦偦鑱氱被綆楁硶http://www.shnenglu.com/polly-yang/archive/2011/05/18/146626.htmlpollypollyWed, 18 May 2011 02:26:00 GMThttp://www.shnenglu.com/polly-yang/archive/2011/05/18/146626.htmlhttp://www.shnenglu.com/polly-yang/comments/146626.htmlhttp://www.shnenglu.com/polly-yang/archive/2011/05/18/146626.html#Feedback0http://www.shnenglu.com/polly-yang/comments/commentRss/146626.htmlhttp://www.shnenglu.com/polly-yang/services/trackbacks/146626.html鏁欐潗涓婄殑綆楁硶鏍規(guī)湰灝辨病璁叉槑鐧斤紝鐞㈢(浜?jiǎn)濂戒箙銆傚叾瀹炲垎綾繪晥鏋滃緢涓嶅ソ銆傛暟鎹垎鏋恠ample濡備笅錛?br />    3.20     2.00----0
    4.60     5.70----0
    1.50     5.00----0
    1.80     6.90----3
    6.10     5.50----0
    7.40     4.90----5
    7.20     9.30----6
    8.40     0.40----7
    9.00     2.70----8
    4.30     1.20----0


polly 2011-05-18 10:26 鍙戣〃璇勮
]]>
伊人久久大香线蕉精品不卡| 色播久久人人爽人人爽人人片aV| 亚洲?V乱码久久精品蜜桃| 99久久精品午夜一区二区| 97精品国产97久久久久久免费| 久久久久久久免费视频| 久久久久久噜噜精品免费直播 | 亚洲欧洲精品成人久久曰影片| 99久久综合狠狠综合久久| 久久精品国产91久久麻豆自制| 国产精品免费看久久久 | 久久无码国产专区精品| 亚洲精品无码久久不卡| 久久午夜福利无码1000合集| 99精品国产综合久久久久五月天 | 久久精品国产亚洲AV香蕉| 久久精品国产亚洲av影院| 久久国产乱子精品免费女| 国产精品一区二区久久精品无码 | 国产69精品久久久久777| 93精91精品国产综合久久香蕉| 成人a毛片久久免费播放| 午夜肉伦伦影院久久精品免费看国产一区二区三区 | 久久国产高清字幕中文| 国产高潮国产高潮久久久91| 久久精品99无色码中文字幕| 久久久久久久波多野结衣高潮| 亚洲第一极品精品无码久久| 高清免费久久午夜精品| 国产成人无码精品久久久免费| 性高湖久久久久久久久AAAAA | 久久超碰97人人做人人爱| 热久久国产精品| 一本久久综合亚洲鲁鲁五月天亚洲欧美一区二区 | 久久99久久成人免费播放| 欧美精品国产综合久久| 77777亚洲午夜久久多喷| 午夜精品久久久久久久无码| 99久久人妻无码精品系列蜜桃| 欧美久久一级内射wwwwww.| 精品熟女少妇av免费久久|