Return-Path: X-Original-To: apmail-incubator-mesos-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-mesos-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1C8F1DE87 for ; Thu, 5 Jul 2012 22:07:03 +0000 (UTC) Received: (qmail 59374 invoked by uid 500); 5 Jul 2012 22:07:03 -0000 Delivered-To: apmail-incubator-mesos-dev-archive@incubator.apache.org Received: (qmail 59341 invoked by uid 500); 5 Jul 2012 22:07:03 -0000 Mailing-List: contact mesos-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mesos-dev@incubator.apache.org Delivered-To: mailing list mesos-dev@incubator.apache.org Received: (qmail 59330 invoked by uid 99); 5 Jul 2012 22:07:02 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jul 2012 22:07:02 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id B55C71C0D92; Thu, 5 Jul 2012 22:07:02 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============5418708973400244002==" MIME-Version: 1.0 Subject: Re: Review Request: Add an API to atomically kill all tasks in a cgroup. From: "Jie Yu" To: "Benjamin Hindman" , "Vinod Kone" Cc: "Jie Yu" , "mesos" Date: Thu, 05 Jul 2012 22:07:02 -0000 Message-ID: <20120705220702.1164.13144@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Jie Yu" X-ReviewGroup: mesos X-ReviewRequest-URL: https://reviews.apache.org/r/5402/ X-Sender: "Jie Yu" References: <20120621194242.28904.41881@reviews.apache.org> In-Reply-To: <20120621194242.28904.41881@reviews.apache.org> Reply-To: "Jie Yu" --===============5418708973400244002== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/5402/ ----------------------------------------------------------- (Updated July 5, 2012, 10:07 p.m.) Review request for mesos, Benjamin Hindman and Vinod Kone. Changes ------- Refactor the code. Use .then to link several operations in TasksKill. Separ= ate cgroup destroy code into a new patch (will submit later). Include a new= test. Summary (updated) ----------------- Add an API to atomically kill all tasks in a cgroup. Description ------- This patch leverages the freezer subsystem in cgroups to kill all the proce= sses in a cgroup atomically. The main idea is to freeze all the processes in a cgroup first, then send k= ill signal to all the proceses. This avoids the need of walking the proc pr= ocess tree to kill all processes associated with an executor. In fact, the = original killtree solution assumes that the user processes haven't blocked = the SIGSTOP signal, which may not be true in some cases. Diffs (updated) ----- 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/5402/diff/ Testing ------- On Linux machine, make check. Thanks, Jie Yu --===============5418708973400244002==--