Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751950AbdFJIJt (ORCPT ); Sat, 10 Jun 2017 04:09:49 -0400 Received: from mx2.suse.de ([195.135.220.15]:36706 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751848AbdFJIJq (ORCPT ); Sat, 10 Jun 2017 04:09:46 -0400 Date: Sat, 10 Jun 2017 10:09:42 +0200 From: Michal Hocko To: David Rientjes Cc: Matthew Wilcox , Vlastimil Babka , Larry Finger , Andrew Morton , LKML , linux-mm@kvack.org Subject: Re: Sleeping BUG in khugepaged for i586 Message-ID: <20170610080941.GA12347@dhcp22.suse.cz> References: <20170605144401.5a7e62887b476f0732560fa0@linux-foundation.org> <1e883924-9766-4d2a-936c-7a49b337f9e2@lwfinger.net> <9ab81c3c-e064-66d2-6e82-fc9bac125f56@suse.cz> <20170608144831.GA19903@dhcp22.suse.cz> <20170608170557.GA8118@bombadil.infradead.org> <20170608201822.GA5535@dhcp22.suse.cz> <20170608203046.GB5535@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1283 Lines: 32 On Fri 09-06-17 15:38:44, David Rientjes wrote: > On Thu, 8 Jun 2017, Michal Hocko wrote: > > > I would just pull the cond_resched out of __collapse_huge_page_copy > > right after pte_unmap. But I am not really sure why this cond_resched is > > really needed because the changelog of the patch which adds is is quite > > terse on details. > > I'm not sure what could possibly be added to the changelog. We have > encountered need_resched warnings during the iteration. Well, the part the changelog is not really clear about is whether the HPAGE_PMD_NR loops itself is the source of the stall. This would be quite surprising because doing 512 iterations taking up to 20+s sounds way to much. So is it possible that we are missing a cond_resched somewhere up the __collapse_huge_page_copy call path? Or do we really do something stupidly expensive here? > We fix these > because need_resched warnings suppress future warnings of the same type > for issues that are more important. Sure thing. I do care about soft lockups as well. > I can fix the i386 issue but removing the cond_resched() entirely isn't > really suitable. I am not calling for a complete removal. I just do not yet see what is the source of the long processing of the the loop. -- Michal Hocko SUSE Labs