[ 
https://issues.apache.org/jira/browse/MESOS-8628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16393522#comment-16393522
 ] 

Benjamin Mahler commented on MESOS-8628:
----------------------------------------

Agent registration:

{noformat}
commit c3157d7ea328405aa1c9c05778b8ffc01884ac38
Author: Jie Yu <[email protected]>
Date:   Sun Dec 10 08:59:35 2017 -0800

    Passed the message directly to the Master::registerSlave handler.

    Some fields in `RegisterSlaveMessage` will become optiona. This patch
    prepares for that. Also, by passing a message directly to the handler,
    it allows us to eliminate some copying by using rvalue references.

    Review: https://reviews.apache.org/r/64487
{noformat}

Agent re-registration:

{noformat}
commit 8b4228049292cab6a8c4a3680de3c1aa5e72a9ff
Author: Dmitry Zhuk <[email protected]>
Date:   Wed Dec 6 09:03:49 2017 -0800

    Changed agent reregistration to work with messages directly.

    `reregisterSlave` now accepts `ReregisterSlaveMessage&&`, which opts-out
    of using protobuf arena, and allows passing message through dispatch
    chain without making any copies. Conversion of repeated message fields
    to `std::vector`s is performed only when needed.

    Review: https://reviews.apache.org/r/63914/
{noformat}

Agent update:

{noformat}
commit aaf043382ce06a952bb6c9f499e0c11ec429c5d1
Author: Jie Yu <[email protected]>
Date:   Wed Dec 13 09:34:51 2017 -0800

    Passed rvalue reference for UpdateSlaveMessage handler.

    This patch also fixed a bug where we don't consistently use the mutated
    message (POST_RESERVATION_REFINEMENT) consistently in the handler.

    This patch is split from https://reviews.apache.org/r/64561.
{noformat}

Additional handlers:

{noformat}
commit 0bbeac0c821afa380af811b66aa541081cb33e22
Author: Benjamin Mahler <[email protected]>
Date:   Wed Mar 7 19:12:35 2018 -0800

    Updated the master's status update handler to avoid unnecessary copying.
    
    Previously, we took a copy in order to mutate the UUID within the
    update if communicating with an agent prior to 0.26. We now no longer
    need to copy the update.
    
    Review: https://reviews.apache.org/r/65964
{noformat}
{noformat}
commit b281f56e80a772a0832dbc423f19a5c41c9bc84e
Author: Benjamin Mahler <[email protected]>
Date:   Wed Mar 7 19:32:08 2018 -0800

    Avoid copying of launch task messages in the master.
    
    Prior to this patch, the launch task message was copied into an
    Accept or Decline call. This updates the handler to perform moves
    instead.
    
    Review: https://reviews.apache.org/r/65965
{noformat}
{noformat}
commit 2e716fa8471bd1c391e21ab9bd34645766aff1dc
Author: Benjamin Mahler <[email protected]>
Date:   Wed Mar 7 19:39:53 2018 -0800

    Updated the master's receive handler to take an rvalue reference.
    
    This allows us to perform copy elimination in subsequent patches.
    
    Review: https://reviews.apache.org/r/65966
{noformat}
{noformat}
commit 8de98cfeb60dc36cb68d8d712e4e45376d9c0d1e
Author: Benjamin Mahler <[email protected]>
Date:   Wed Mar 7 19:40:58 2018 -0800

    Eliminated some copying in the master's Accept call handler path.
    
    This eliminates two copies of the `Accept` message.
    
    Review: https://reviews.apache.org/r/65967
{noformat}
{noformat}
commit 9b2712681e430f5bdf549f234a08453f0fd963bf
Author: Benjamin Mahler <[email protected]>
Date:   Wed Mar 7 19:45:14 2018 -0800

    Updated the master's decline handler to take an rvalue reference.
    
    The master's handlers should all take rvalue references for
    consistency.
    
    Review: https://reviews.apache.org/r/65968
{noformat}
{noformat}
commit 3515ba991315dd3c56f6c43a3751dc43b4b3c79e
Author: Benjamin Mahler <[email protected]>
Date:   Wed Mar 7 19:59:10 2018 -0800

    Avoid a copy of the status update acknowledgements in the master.
    
    This updates the handler to take an rvalue reference and move the
    data into the `scheduler::Call::Acknowledge` message.
    
    Review: https://reviews.apache.org/r/65969
{noformat}
{noformat}
commit ff85aeb9ddb89305f7b764d8891aa45fd9df9cf6
Author: Benjamin Mahler <[email protected]>
Date:   Wed Mar 7 20:03:24 2018 -0800

    Avoid copying acknowledgement message data in the master.
    
    This updates the acknowledge call handler to take an rvalue reference
    for consistency. This also updates the handler to move the data into
    the outgoing message.
    
    Review: https://reviews.apache.org/r/65970
{noformat}
{noformat}
commit 53f253f96b7fd6e59f3cfaf5964d95c155718bab
Author: Benjamin Mahler <[email protected]>
Date:   Wed Mar 7 20:08:57 2018 -0800

    Avoid a copy of the scheduler->executor message in the master.
    
    This avoids a copy in both the v1 http and v0 message code paths.
    
    Review: https://reviews.apache.org/r/65971
{noformat}
{noformat}
commit af1ae2b6dac9e2da92b50613b1ad0119255ca4d9
Author: Benjamin Mahler <[email protected]>
Date:   Wed Mar 7 20:14:39 2018 -0800

    Avoid copying scheduler->executor message data in the master.
    
    This avoids a copy of the scheduler->executor message for the
    v0 message path in the master.
    
    Review: https://reviews.apache.org/r/65972
{noformat}
{noformat}
commit 9affb606d174abcb3f4e4dddfe20567d9316532f
Author: Benjamin Mahler <[email protected]>
Date:   Wed Mar 7 20:21:41 2018 -0800

    Avoid copying executor->scheduler message data in the master.
    
    This avoids a copy of the executor->scheduler message for the
    v0 message path in the master.
    
    Review: https://reviews.apache.org/r/65973
{noformat}

> Perform copy elimination across master message handlers.
> --------------------------------------------------------
>
>                 Key: MESOS-8628
>                 URL: https://issues.apache.org/jira/browse/MESOS-8628
>             Project: Mesos
>          Issue Type: Improvement
>          Components: master
>            Reporter: Benjamin Mahler
>            Priority: Major
>              Labels: performance
>
> Now that we have protobuf move support and move support for libprocess 
> {{install}}, we can do a sweep of the master's message handlers and eliminate 
> copying.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to