From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752161AbdAMMPl (ORCPT ); Fri, 13 Jan 2017 07:15:41 -0500 Received: from mx2.suse.de ([195.135.220.15]:36058 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751568AbdAMMPj (ORCPT ); Fri, 13 Jan 2017 07:15:39 -0500 Date: Fri, 13 Jan 2017 13:15:36 +0100 From: Petr Mladek To: Sergey Senozhatsky Cc: Sergey Senozhatsky , Tetsuo Handa , mhocko@suse.com, linux-mm@kvack.org, Greg Kroah-Hartman , Jiri Slaby , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/page_alloc: Wait for oom_lock before retrying. Message-ID: <20170113121536.GK14894@pathway.suse.cz> References: <201612221927.BGE30207.OSFJMFLFOHQtOV@I-love.SAKURA.ne.jp> <20161222134250.GE413@tigerII.localdomain> <201612222301.AFG57832.QOFMSVFOJHLOtF@I-love.SAKURA.ne.jp> <20161222140930.GF413@tigerII.localdomain> <201612261954.FJE69201.OFLVtFJSQFOHMO@I-love.SAKURA.ne.jp> <20161226113407.GA515@tigerII.localdomain> <20170112141844.GA20462@pathway.suse.cz> <20170113022843.GA9360@jagdpanzerIV.localdomain> <20170113110323.GH14894@pathway.suse.cz> <20170113115024.GA16506@jagdpanzerIV.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170113115024.GA16506@jagdpanzerIV.localdomain> 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 Fri 2017-01-13 20:50:24, Sergey Senozhatsky wrote: > On (01/13/17 12:03), Petr Mladek wrote: > [..] > > > why can't we? > > > > Because it would newer call cond_resched() in non-preemptive kernel > > with CONFIG_PREEMPT_COUNT disabled. IMHO, we want to call it, > > for example, when we scroll the entire screen from tty_operations. > > > > Or do I miss anything? > > so... basically. it has never called cond_resched() there. right? > why is this suddenly a problem now? But it called cond_resched() when the very same code was called from tty operations under console_lock() that forced console_may_schedule = 1; It will never call cond_resched() from the tty operations when CONFIG_PREEMPT_COUNT is disabled and we try to detect the preemption automatically. Best Regards, Petr