From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752682Ab1LLA2i (ORCPT ); Sun, 11 Dec 2011 19:28:38 -0500 Received: from mail-qy0-f174.google.com ([209.85.216.174]:38799 "EHLO mail-qy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752618Ab1LLA2g (ORCPT ); Sun, 11 Dec 2011 19:28:36 -0500 Date: Mon, 12 Dec 2011 01:28:29 +0100 From: Frederic Weisbecker To: Vincent Li Cc: Ingo Molnar , Don Zickus , Peter Zijlstra , Andrew Morton , Mandeep Singh Baines , linux-kernel@vger.kernel.org Subject: Re: [PATCH] Softlockup (out of cpu) killer Message-ID: <20111212002826.GA23901@somewhere> References: <1323643735-1999-1-git-send-email-vincent.mc.li@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1323643735-1999-1-git-send-email-vincent.mc.li@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 11, 2011 at 02:48:55PM -0800, Vincent Li wrote: > In kernel, there is out of memory (OOM) killer, why not make an out of cpu (OOC) killer? > I tested following patch by running an user-space cpu hogging process and the softlockukp > detector killed the process successfully. > > Softlockup could be caused by user-space process hogging cpu, add softlockup_kill kernel > config to allow kernel to kill the user space cpu hogging process. this feature is > useful for high availability systems that have uptime gurantees and where a softlockup > must be resolved ASAP > > echo 1 > /proc/sys/kernel/softlockukp_kill to enable cpu hog process killer > echo 0 > /proc/sys/kernel/softlockup_kill to disable cpu hog process killer That assumes a signal would be enough to pull a process out of its softlockup. I believe this is seldom the case. A process in a softlockup is stuck in some place that has preemption disabled. Unless it luckily polls there for pending signals, that won't work. But may be that happens more often than I think. May be other people have more insight.