From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755688AbdKBOI7 (ORCPT ); Thu, 2 Nov 2017 10:08:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45404 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752657AbdKBOI5 (ORCPT ); Thu, 2 Nov 2017 10:08:57 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8D08681DF2 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=oleg@redhat.com Date: Thu, 2 Nov 2017 15:08:53 +0100 From: Oleg Nesterov To: Miroslav Benes Cc: Petr Mladek , jpoimboe@redhat.com, jeyu@kernel.org, jikos@kernel.org, lpechacek@suse.cz, pavel@ucw.cz, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Ellerman , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Andy Lutomirski , linuxppc-dev@lists.ozlabs.org, x86@kernel.org Subject: Re: [PATCH v3 1/2] livepatch: send a fake signal to all blocking tasks Message-ID: <20171102140853.GB23415@redhat.com> References: <20171031114853.841-1-mbenes@suse.cz> <20171031114853.841-2-mbenes@suse.cz> <20171101151355.GG20040@pathway.suse.cz> <20171101164314.GA32760@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 02 Nov 2017 14:08:57 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/02, Miroslav Benes wrote: > > On Wed, 1 Nov 2017, Oleg Nesterov wrote: > > > Note also that wake_up_state(TASK_INTERRUPTIBLE) won't wakeup the TASK_IDLE > > kthreads, and most of the kthreads which use TASK_INTERRUPTIBLE should use > > TASK_IDLE today, because in most cases TASK_INTERRUPTIBLE was used to not > > contribute to loadavg. > > Yes. Unfortunately, we have TASK_IDLE for more than two years now and > nothing much has happened yet. TASK_IDLE is still used sporadically. I'd > like to be on the safe side with livepatch OK, as I said I won't argue, > and given that > TASK_INTERRUPTIBLE loops should be prepared for spurious wakeups by > definition, Not really when it comes to kthreads. Once again, unless kthread does allow_signal() TASK_INTERRUPTIBLE does not really differ from TASK_UNINTERRUPTIBLE except the latter contributes to loadavg. And that is why TASK_INTERRUPTIBLE was commonly used instead of TASK_UNINTERRUPTIBLE, so I do not think that TASK_INTERRUPTIBLE loops are more ready in general than TASK_UNINTERRUPTIBLE. Oleg.