From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Mladek Date: Fri, 13 Jan 2017 12:15:36 +0000 Subject: Re: [PATCH] mm/page_alloc: Wait for oom_lock before retrying. Message-Id: <20170113121536.GK14894@pathway.suse.cz> List-Id: 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> In-Reply-To: <20170113115024.GA16506@jagdpanzerIV.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 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