From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755077AbcCPC3v (ORCPT ); Tue, 15 Mar 2016 22:29:51 -0400 Received: from mail-pf0-f181.google.com ([209.85.192.181]:33659 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754636AbcCPC3u (ORCPT ); Tue, 15 Mar 2016 22:29:50 -0400 Date: Wed, 16 Mar 2016 11:31:13 +0900 From: Sergey Senozhatsky To: Byungchul Park Cc: Sergey Senozhatsky , Petr Mladek , Sergey Senozhatsky , Andrew Morton , Jan Kara , Tejun Heo , Tetsuo Handa , linux-kernel@vger.kernel.org, Jan Kara Subject: Re: [RFC][PATCH v4 1/2] printk: Make printk() completely async Message-ID: <20160316023113.GB3217@swordfish> References: <1457964820-4642-1-git-send-email-sergey.senozhatsky@gmail.com> <1457964820-4642-2-git-send-email-sergey.senozhatsky@gmail.com> <20160315155849.GW10940@pathway.suse.cz> <20160316020115.GA3217@swordfish> <20160316021049.GI5220@X58A-UD3R> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160316021049.GI5220@X58A-UD3R> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (03/16/16 11:10), Byungchul Park wrote: > > > What about this? > > > > > > int need_flush_console; > > > > > > while(1) { > > > set_current_state(TASK_INTERRUPTIBLE); > > > if (!need_flush_console) > > > schedule(); > > else // This shoule be here, IMHO. Hm? do __set_current_state(TASK_RUNNING) only if need_flush_console == true? why? I see no problems with Petr's code. > > > __set_current_state(TASK_RUNNING); > > > > > > need_flush_console = false; > > > > > > > + console_lock(); > > > > + console_unlock(); > > > > + } -ss