[lkml]   [2013]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v6 5/6] MCS Lock: Restructure the MCS lock defines and locking code into its own file

* Tim Chen <> wrote:

> > If we prefer to optimize this a bit though, perhaps we can first move
> > the node->lock = 0 so that it gets executed after the "if (likely(prev
> > == NULL)) {}" code block and then delete "node->lock = 1" inside the
> > code block.
> I suppose we can save one single assignment. The gain is probably not
> noticeable as once we set node->next to NULL, node->locked is likely in
> local cache line and the assignment operation is cheap.

Would be nice to have this as a separate, add-on patch. Every single
instruction removal that has no downside is an upside!

You can add a comment that explains it.



 \ /
  Last update: 2013-09-27 08:21    [W:0.109 / U:7.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site