From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758040AbcIXNSk (ORCPT ); Sat, 24 Sep 2016 09:18:40 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:35178 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751900AbcIXNSj (ORCPT ); Sat, 24 Sep 2016 09:18:39 -0400 Subject: Re: [PATCH] mm: warn about allocations which stall for too long To: Dave Hansen , Michal Hocko , linux-mm@kvack.org References: <20160923081555.14645-1-mhocko@kernel.org> <57E56789.1070205@intel.com> Cc: Andrew Morton , Johannes Weiner , Mel Gorman , Tetsuo Handa , LKML , Michal Hocko From: Balbir Singh Message-ID: <31729f1f-c0da-29e4-5777-69446daab122@gmail.com> Date: Sat, 24 Sep 2016 23:19:04 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <57E56789.1070205@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/09/16 03:34, Dave Hansen wrote: > On 09/23/2016 01:15 AM, Michal Hocko wrote: >> + /* Make sure we know about allocations which stall for too long */ >> + if (!(gfp_mask & __GFP_NOWARN) && time_after(jiffies, alloc_start + stall_timeout)) { >> + pr_warn("%s: page alloction stalls for %ums: order:%u mode:%#x(%pGg)\n", >> + current->comm, jiffies_to_msecs(jiffies-alloc_start), >> + order, gfp_mask, &gfp_mask); >> + stall_timeout += 10 * HZ; >> + dump_stack(); >> + } > > This would make an awesome tracepoint. There's probably still plenty of > value to having it in dmesg, but the configurability of tracepoints is > hard to beat. An awesome tracepoint and a great place to trigger other tracepoints. With stall timeout increasing every time, do we only care about the first instance when we exceeded stall_timeout? Do we debug just that instance? Balbir Singh.