From patchwork Fri Apr 24 13:43:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tim.gore@intel.com X-Patchwork-Id: 6270491 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C095C9F389 for ; Fri, 24 Apr 2015 13:43:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 03D1820328 for ; Fri, 24 Apr 2015 13:43:46 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 1E65320266 for ; Fri, 24 Apr 2015 13:43:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EC1D16E19C; Fri, 24 Apr 2015 06:43:43 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id EB8BA6E19C for ; Fri, 24 Apr 2015 06:43:41 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 24 Apr 2015 06:43:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,640,1422950400"; d="scan'208";a="714978100" Received: from tgore-linux.isw.intel.com ([10.102.226.89]) by fmsmga002.fm.intel.com with ESMTP; 24 Apr 2015 06:43:40 -0700 From: tim.gore@intel.com To: intel-gfx@lists.freedesktop.org Date: Fri, 24 Apr 2015 14:43:39 +0100 Message-Id: <1429883019-32248-1-git-send-email-tim.gore@intel.com> X-Mailer: git-send-email 2.3.0 Cc: thomas.wood@intel.com Subject: [Intel-gfx] [PATCH i-g-t] lib/igt_core.c : only disable low mem killer once X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Tim Gore The call to low_mem_killer_disable(true) was being done from within function oom_adjust_for_doom. However, oom_adjust_for_doom gets called from 3 places. We only want the call to low_mem_killer_disable(true) to happen during common_init, so call it from here instead of from oom_adjust_for_doom. Signed-off-by: Tim Gore --- lib/igt_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/igt_core.c b/lib/igt_core.c index 7d04f2c..fec4893 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -490,7 +490,6 @@ static void oom_adjust_for_doom(void) igt_assert(write(fd, always_kill, sizeof(always_kill)) == sizeof(always_kill)); close(fd); - low_mem_killer_disable(true); } static int common_init(int *argc, char **argv, @@ -653,6 +652,7 @@ out: print_version(); oom_adjust_for_doom(); + low_mem_killer_disable(true); } /* install exit handler, to ensure we clean up */