> On June 25, 2012, 8:01 p.m., Benjamin Hindman wrote: > > src/linux/cgroups.cpp, line 858 > > <https://reviews.apache.org/r/5395/diff/5/?file=112400#file112400line858> > > > > This is great, but can we think of any other abstractions this can use > > to make this stuff even simpler? In particular, what about a > > process::io::read which handles spurious events? See this: > > https://reviews.apache.org/r/5567
Done. > On June 25, 2012, 8:01 p.m., Benjamin Hindman wrote: > > src/linux/cgroups.cpp, line 870 > > <https://reviews.apache.org/r/5395/diff/5/?file=112400#file112400line870> > > > > virtual Done. > On June 25, 2012, 8:01 p.m., Benjamin Hindman wrote: > > src/linux/cgroups.cpp, line 872 > > <https://reviews.apache.org/r/5395/diff/5/?file=112400#file112400line872> > > > > virtual Done. > On June 25, 2012, 8:01 p.m., Benjamin Hindman wrote: > > src/linux/cgroups.cpp, line 933 > > <https://reviews.apache.org/r/5395/diff/5/?file=112400#file112400line933> > > > > Is this supposed to account for spurious events? Or couldn't "none" > > here mean EOF? Done. > On June 25, 2012, 8:01 p.m., Benjamin Hindman wrote: > > src/linux/cgroups.cpp, line 383 > > <https://reviews.apache.org/r/5395/diff/5/?file=112400#file112400line383> > > > > This is so similar to just utils::os::read that we should create > > another utils version that does the conversion for you (probably via > > std::stringstream or boost::lexical_cast). The big difference here is > > returning 'none' for EAGAIN, but see my comment below. Done. > On June 25, 2012, 8:01 p.m., Benjamin Hindman wrote: > > src/linux/cgroups.cpp, line 328 > > <https://reviews.apache.org/r/5395/diff/5/?file=112400#file112400line328> > > > > Older versions of glibc don't have eventfd. We need to wrap it if > > necessary. Maybe we should add a check in the autotool to check the glibc version. But anyway, cgroups is not available in the kernel if eventfd is not. Therefore, I think there are two possibilities if eventfd is not available: 1) if you try to compile on that platform, compilation will not succeed 2) if you compile on other machine and try to run the binary on a machine without eventfd, the linking will fail - Jie ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/5395/#review8426 ----------------------------------------------------------- On June 26, 2012, 6:21 p.m., Jie Yu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/5395/ > ----------------------------------------------------------- > > (Updated June 26, 2012, 6:21 p.m.) > > > Review request for mesos, Benjamin Hindman and Vinod Kone. > > > Description > ------- > > In cgroups, sometimes you want to be notified if some certain events happen. > For example, users may want to be notified when an out-of-memory event > happens. > > This patch introduce a function called "listenEvent" which returns an > instance of Future so that you can check the status of this future to see > whether any event happens. > > This interface is general to all the events in cgroups. > > > Diffs > ----- > > src/linux/cgroups.hpp PRE-CREATION > src/linux/cgroups.cpp PRE-CREATION > src/tests/cgroups_tests.cpp PRE-CREATION > > Diff: https://reviews.apache.org/r/5395/diff/ > > > Testing > ------- > > On Linux machines, make check. > > > Thanks, > > Jie Yu > >
