Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp448542imu; Thu, 8 Nov 2018 23:53:03 -0800 (PST) X-Google-Smtp-Source: AJdET5fV7htSQn/q4KZ/b3+JbqvYj5h7/4e5o18VayAdhyeP6FxEaBXcxTcFs2TLkFpZI2GAsKYV X-Received: by 2002:a62:e10c:: with SMTP id q12-v6mr7756432pfh.75.1541749983377; Thu, 08 Nov 2018 23:53:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541749983; cv=none; d=google.com; s=arc-20160816; b=N5QGPcc5nrVK9yZJLc6BJ1N6iZ7lueqci7cSboGmI8pOWMvgYUuu/4rnlYbEGhpe37 nGjU66uELK1f3lVSESIk8TmsTSG4epc8Z4EEG9OYkYNAtd0Qe81DfBarQ3536PCE2B4u h/Nru+K39bwof84wZVhuTLd33sPeV6ue9Dm6v2ETb4+tE0IWVGK8byhuzKpaYg45cOKR 68wZhQtO1yJaOjB6lycPycfe4RPXYf2Jm6DrraRtZOSXw1jqX0F/4kOFmhhkUtP8Phzv mfN4eCW8OVvZD48m08fthLtoQbp8Ejid8v/0ZWB71IpL8NLkBD2ayItkmSsbBuy0s7cb nhpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language:thread-index :content-transfer-encoding:mime-version:message-id:date:subject :in-reply-to:references:cc:to:from; bh=N0RTe9EnJ7ksRoUIDpDgQHOtKPHaMXA1JzjCJ1r4HLE=; b=CtpJADLgxNUkqt8Sda4Nf8vIIxjRimKVI9+GsAU7vaTT3mdj53W+7QQ4nKBELvx8KH L0ftPA8IWjiSokloT+cSfVrU1mr+JQl1RU6A0nnaHYRk9MyxaUm71hgBHzMw7qRyyxDJ qt17Yrsti8ojkmmJQcFgsHc2f5qUfj1m8zMD2cZROj23NUrgiPvLXVJtiQg95uOYNHNO Qd0Z9NK9x3s65NyRlORwpQh/V7kB3JahpwHtPFaDMmgQpifzXgZ9CQkTOKWECyH0rMyx zVxYFXcvP9sgv2WbznPVf0yj62PxESA00zqIlxLgq5z9FntQ9np+Rm+X2PVCzpka/hid 0iog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 30-v6si7273848pla.56.2018.11.08.23.52.47; Thu, 08 Nov 2018 23:53:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728392AbeKIR36 (ORCPT + 99 others); Fri, 9 Nov 2018 12:29:58 -0500 Received: from lgeamrelo12.lge.com ([156.147.23.52]:41765 "EHLO lgeamrelo11.lge.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728141AbeKIR36 (ORCPT ); Fri, 9 Nov 2018 12:29:58 -0500 Received: from unknown (HELO lgemrelse7q.lge.com) (156.147.1.151) by 156.147.23.52 with ESMTP; 9 Nov 2018 16:50:34 +0900 X-Original-SENDERIP: 156.147.1.151 X-Original-MAILFROM: chanho.min@lge.com Received: from unknown (HELO WMRRD11NA101CK) (10.178.32.163) by 156.147.1.151 with ESMTP; 9 Nov 2018 16:50:33 +0900 X-Original-SENDERIP: 10.178.32.163 X-Original-MAILFROM: chanho.min@lge.com From: "Chanho Min" To: "'Oleg Nesterov'" Cc: "'Rafael J. Wysocki'" , "'Pavel Machek'" , "'Len Brown'" , "'Andrew Morton'" , "'Eric W. Biederman'" , "'Christian Brauner'" , "'Anna-Maria Gleixner'" , , , "'Seungho Park'" , "'Jongsung Kim'" , "'Inkyu Hwang'" , "'donghwan.jung'" References: <1541671796-8725-1-git-send-email-chanho.min@lge.com> <20181108105030.GB9939@redhat.com> In-Reply-To: Subject: RE: [PATCH] freezer: fix freeze timeout on exec Date: Fri, 9 Nov 2018 16:50:33 +0900 Message-ID: <05cd01d47800$e52669a0$af733ce0$@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQDMxpYjKJ+WuoJrEZbXJl5GJ1YyTAISrvFpp0VR2WCAAIt64A== Content-Language: ko Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > > Can't we simply change de_thread() to use freezable_schedule() ? > > > > Oleg. > > We need to change freezable_schedule_timeout() instead. > freezable_schedule also can't be frozen if sub-threads can't stop > schedule(). > Furthermore, I'm not sure if it is safe to freeze it at de_thread(). > > diff --git a/fs/exec.c b/fs/exec.c > index 9c5ee2a..291cbd6 100644 > --- a/fs/exec.c > +++ b/fs/exec.c > @@ -942,7 +942,7 @@ static int de_thread(struct task_struct *tsk) > while (sig->notify_count) { > __set_current_state(TASK_KILLABLE); > spin_unlock_irq(lock); > - schedule(); > + while (!freezable_schedule_timeout(HZ)); > if (unlikely(__fatal_signal_pending(tsk))) > goto killed; > spin_lock_irq(lock); > > Chanho Sorry, I might misunderstand freezer. Changes to freezable_schedule() works fine. It looks safe. I'll apply patch again. Chanho