mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Klues <klue...@gmail.com>
Subject Re: Review Request 48375: Rearranged Nvidia GPU files to cleanup semantics for header inclusion.
Date Wed, 29 Jun 2016 23:09:58 GMT

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

(Updated June 29, 2016, 11:09 p.m.)


Review request for mesos and Benjamin Mahler.


Changes
-------

Edited commit message and fixed some "double" includes from rebase.


Bugs: MESOS-5563
    https://issues.apache.org/jira/browse/MESOS-5563


Repository: mesos


Description (updated)
-------

Previously, any components outside of
`src/slave/containerizers/mesos/isolators/gpu` that needed access to
header files in this folder had to protect (most) of their #includes
with an #ifdef __linux__ directive. However, at least one header file
should not be protected by this directive (i.e. components.hpp),
making it confusing as to which headers should be protected by
__linux__ and which ones shouldn't. Before this commit, components
could end up with #include blocks such as:

  #ifdef __linux__
  #include "src/slave/containerizers/mesos/isolators/gpu/allocator.hpp"
  #include "src/slave/containerizers/mesos/isolators/gpu/nvidia.hpp"
  #include "src/slave/containerizers/mesos/isolators/gpu/nvml.hpp"
  #endif
  #include "src/slave/containerizers/mesos/isolators/gpu/components.hpp"

This commit cleans up this header madness, by creating a common
"nvidia.hpp" header that takes care of all the dependencies on
__linux__ for you. All componenents outside of
`src/slave/containerizers/mesos/isolators/gpu` now only need to #include
this one header instead of managing everything themselves.


Diffs (updated)
-----

  src/Makefile.am 86c39fdf379ada470c9b1f86be263ef71dc47c41 
  src/slave/containerizer/containerizer.cpp 2449526061f7d6ac46ff42260ccdd0278694d9d4 
  src/slave/containerizer/docker.hpp 9b0a5a76e457006119e657ee8f627dcd1326c0ce 
  src/slave/containerizer/mesos/containerizer.hpp a1a00020668f6da8d611f26e5637afffc87d09ba

  src/slave/containerizer/mesos/containerizer.cpp d984efd4742ec084d66538c48a36ea768832324d

  src/slave/containerizer/mesos/isolators/gpu/isolator.hpp PRE-CREATION 
  src/slave/containerizer/mesos/isolators/gpu/nvidia.hpp e35a55fdf44ec01d49d6a9e396a88f4163ef79c3

  src/slave/containerizer/mesos/isolators/gpu/nvidia.cpp b8753ec8fc0afc8f2b389250de57d5095287acf9

  src/tests/containerizer/nvidia_gpu_isolator_tests.cpp 28ec3f9954576d78153e9d0f57e22a240e950639


Diff: https://reviews.apache.org/r/48375/diff/


Testing
-------

GTEST_FILTER="" make -j check && sudo GTEST_FILTER="*NVIDIA*" src/mesos-tests


Thanks,

Kevin Klues


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message