-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/50841/#review146313
-----------------------------------------------------------




src/slave/containerizer/docker.cpp (lines 698 - 716)
<https://reviews.apache.org/r/50841/#comment212693>

    This can be simplified as 
    
    ```
    nvidiaGpuAllocator->deallocate(deallocated)
      .onReady(defer(self(), [=](const Nothing& nothing) {
        containers_[containerId]->gpuAllocated.clear();
      }))
      .onFailed(defer(self(), [=](const string& message) {
        LOG(ERROR) << "Deallocate GPUs failed for container '" << containerId
                   << "': " << message;
      }))
      .onDiscarded(defer(self(), [=]() {
        LOG(ERROR) << "Deallocate GPUs discarded for container '" << 
containerId;
      }));
    
      return Nothing();
    ```


- Guangya Liu


On 八月 16, 2016, 10:19 a.m., Yubo Li wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50841/
> -----------------------------------------------------------
> 
> (Updated 八月 16, 2016, 10:19 a.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, Guangya Liu, Kevin Klues, and 
> Rajat Phull.
> 
> 
> Bugs: MESOS-5795
>     https://issues.apache.org/jira/browse/MESOS-5795
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added control logic to allocate/deallocate GPUs to GPU-related task
> when the task is started/terminated.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/docker.hpp f2a06065cf99fed934c2c1ffc47461ec8a97f50d 
>   src/slave/containerizer/docker.cpp 5c1ee8e467d1c54c60b67dc5275ef71e1bb90723 
> 
> Diff: https://reviews.apache.org/r/50841/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Yubo Li
> 
>

Reply via email to