----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/50841/#review153021 -----------------------------------------------------------
src/slave/containerizer/docker.hpp (lines 258 - 274) <https://reviews.apache.org/r/50841/#comment222240> Move this to `#ifdef __linux__` ``` #ifdef __linux__ // Allocate GPU resources for a specified container. process::Future<Nothing> allocateNvidiaGpus( const size_t count, const ContainerID& containerId); process::Future<Nothing> _allocateNvidiaGpus( const std::set<Gpu>& allocated, const ContainerID& containerId); // Deallocate GPU resources for a specified container. process::Future<Nothing> deallocateNvidiaGpus( const ContainerID& containerId); process::Future<Nothing> _deallocateNvidiaGpus( const ContainerID& containerId); #endif ``` src/slave/containerizer/docker.hpp (lines 503 - 504) <https://reviews.apache.org/r/50841/#comment222241> ``` #ifdef __linux__ // GPU resources allocated to the container. std::set<Gpu> gpus; #endif ``` src/slave/containerizer/docker.cpp (lines 670 - 688) <https://reviews.apache.org/r/50841/#comment222242> You will not need `#ifdef __linux__` for those helper functions as we already put those helper functions surrounded by `#ifdef __liux__`. Ditto for others. - Guangya Liu On 十月 14, 2016, 9:56 a.m., Yubo Li wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/50841/ > ----------------------------------------------------------- > > (Updated 十月 14, 2016, 9:56 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 8da63101f951892e673612134770fc155d86112d > src/slave/containerizer/docker.cpp 8ec4c0a25335fb1b36cb2ab82577f6d3e2f7f008 > > Diff: https://reviews.apache.org/r/50841/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Yubo Li > >