Re: [ceph-users] why no likely() and unlikely() used in Ceph's source code?
ok, thank you all. 2014-09-16 0:52 GMT+08:00 Yehuda Sadeh yeh...@redhat.com: I agree with Greg. When dealing with the latencies that we deal with due to different IO operations (networking, storage), it's mostly not worth the trouble. I think the main reason we didn't actually put it to use is that we forgot we've had this macro defined, and it really wasn't worth the trouble. I do think though that we can keep it in mind, and when developing add these notations when appropriate even if only for code readability. Thanks, Yehuda On Mon, Sep 15, 2014 at 9:39 AM, Gregory Farnum g...@inktank.com wrote: I don't know where the file came from, but likely/unlikely markers are the kind of micro-optimization that isn't worth the cost in Ceph dev resources right now. -Greg On Monday, September 15, 2014, Tim Zhang cofol1...@gmail.com wrote: Hey guys, After reading ceph source code, I find that there is a file named common/likely.h and it implements the function likely() and unlikey() which will optimize the prediction of code branch for cpu. But there isn't any place using these two functions, I am curious about why the developer of ceph not using these two functions to achieve more performance. Can anyone provide some hints? BR -- Software Engineer #42 @ http://inktank.com | http://ceph.com ___ ceph-users mailing list ceph-users@lists.ceph.com http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com ___ ceph-users mailing list ceph-users@lists.ceph.com http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
[ceph-users] why no likely() and unlikely() used in Ceph's source code?
Hey guys, After reading ceph source code, I find that there is a file named common/likely.h and it implements the function likely() and unlikey() which will optimize the prediction of code branch for cpu. But there isn't any place using these two functions, I am curious about why the developer of ceph not using these two functions to achieve more performance. Can anyone provide some hints? BR ___ ceph-users mailing list ceph-users@lists.ceph.com http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
Re: [ceph-users] why no likely() and unlikely() used in Ceph's source code?
Perhaps this question belongs in ceph-dev ? *Marco Garcês* *#sysadmin* Maputo - Mozambique *[Phone]* +258 84 4105579 *[Skype]* marcogarces On Mon, Sep 15, 2014 at 12:28 PM, Tim Zhang cofol1...@gmail.com wrote: Hey guys, After reading ceph source code, I find that there is a file named common/likely.h and it implements the function likely() and unlikey() which will optimize the prediction of code branch for cpu. But there isn't any place using these two functions, I am curious about why the developer of ceph not using these two functions to achieve more performance. Can anyone provide some hints? BR ___ ceph-users mailing list ceph-users@lists.ceph.com http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com ___ ceph-users mailing list ceph-users@lists.ceph.com http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
[ceph-users] why no likely() and unlikely() used in Ceph's source code?
Hey guys, After reading ceph source code, I find that there is a file named common/likely.h and it implements the function likely() and unlikey() which will optimize the prediction of code branch for cpu. But there isn't any place using these two functions, I am curious about why the developer of ceph not using these two functions to achieve more performance. Can anyone provide some hints? BR ___ ceph-users mailing list ceph-users@lists.ceph.com http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
Re: [ceph-users] why no likely() and unlikely() used in Ceph's source code?
the ceph-dev always deny my mail telling that my mail is a jam because it include html code, actually it is not. 2014-09-15 19:43 GMT+08:00 Marco Garcês ma...@garces.cc: Perhaps this question belongs in ceph-dev ? *Marco Garcês* *#sysadmin* Maputo - Mozambique *[Phone]* +258 84 4105579 *[Skype]* marcogarces On Mon, Sep 15, 2014 at 12:28 PM, Tim Zhang cofol1...@gmail.com wrote: Hey guys, After reading ceph source code, I find that there is a file named common/likely.h and it implements the function likely() and unlikey() which will optimize the prediction of code branch for cpu. But there isn't any place using these two functions, I am curious about why the developer of ceph not using these two functions to achieve more performance. Can anyone provide some hints? BR ___ ceph-users mailing list ceph-users@lists.ceph.com http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com ___ ceph-users mailing list ceph-users@lists.ceph.com http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
Re: [ceph-users] why no likely() and unlikely() used in Ceph's source code?
On Mon, 15 Sep 2014 22:48:07 +0800 Tim Zhang wrote: the ceph-dev always deny my mail telling that my mail is a jam because it include html code, actually it is not. Actually it is, like this very mail from you. I would think/hope that there is a configuration option in Gmail to turn that off: --- Content-Type: multipart/mixed; boundary0861367859==[ the ceph-dev always deny my mail telling that my mail is a jam because it include html code, actually it is not. ... --===0861367859== Content-Type: multipart/alternative; boundary=001a11c338a213d7cb05031bb9a0 --001a11c338a213d7cb05031bb9a0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable ... --001a11c338a213d7cb05031bb9a0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable div dir=3Dltrthe=C2=A0span style=3Dfont-family:arial,sans-serif;font-= size:14.39618530273pxceph-dev always deny my mail telling that my mai= --- Christian 2014-09-15 19:43 GMT+08:00 Marco Garcês ma...@garces.cc: Perhaps this question belongs in ceph-dev ? *Marco Garcês* *#sysadmin* Maputo - Mozambique *[Phone]* +258 84 4105579 *[Skype]* marcogarces On Mon, Sep 15, 2014 at 12:28 PM, Tim Zhang cofol1...@gmail.com wrote: Hey guys, After reading ceph source code, I find that there is a file named common/likely.h and it implements the function likely() and unlikey() which will optimize the prediction of code branch for cpu. But there isn't any place using these two functions, I am curious about why the developer of ceph not using these two functions to achieve more performance. Can anyone provide some hints? BR ___ ceph-users mailing list ceph-users@lists.ceph.com http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com -- Christian BalzerNetwork/Systems Engineer ch...@gol.com Global OnLine Japan/Fusion Communications http://www.gol.com/ ___ ceph-users mailing list ceph-users@lists.ceph.com http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
Re: [ceph-users] why no likely() and unlikely() used in Ceph's source code?
I don't know where the file came from, but likely/unlikely markers are the kind of micro-optimization that isn't worth the cost in Ceph dev resources right now. -Greg On Monday, September 15, 2014, Tim Zhang cofol1...@gmail.com wrote: Hey guys, After reading ceph source code, I find that there is a file named common/likely.h and it implements the function likely() and unlikey() which will optimize the prediction of code branch for cpu. But there isn't any place using these two functions, I am curious about why the developer of ceph not using these two functions to achieve more performance. Can anyone provide some hints? BR -- Software Engineer #42 @ http://inktank.com | http://ceph.com ___ ceph-users mailing list ceph-users@lists.ceph.com http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
Re: [ceph-users] why no likely() and unlikely() used in Ceph's source code?
I agree with Greg. When dealing with the latencies that we deal with due to different IO operations (networking, storage), it's mostly not worth the trouble. I think the main reason we didn't actually put it to use is that we forgot we've had this macro defined, and it really wasn't worth the trouble. I do think though that we can keep it in mind, and when developing add these notations when appropriate even if only for code readability. Thanks, Yehuda On Mon, Sep 15, 2014 at 9:39 AM, Gregory Farnum g...@inktank.com wrote: I don't know where the file came from, but likely/unlikely markers are the kind of micro-optimization that isn't worth the cost in Ceph dev resources right now. -Greg On Monday, September 15, 2014, Tim Zhang cofol1...@gmail.com wrote: Hey guys, After reading ceph source code, I find that there is a file named common/likely.h and it implements the function likely() and unlikey() which will optimize the prediction of code branch for cpu. But there isn't any place using these two functions, I am curious about why the developer of ceph not using these two functions to achieve more performance. Can anyone provide some hints? BR -- Software Engineer #42 @ http://inktank.com | http://ceph.com ___ ceph-users mailing list ceph-users@lists.ceph.com http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com ___ ceph-users mailing list ceph-users@lists.ceph.com http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com