lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 12 Sep 2017 09:14:05 +0200
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Mikulas Patocka <mpatocka@...hat.com>,
        Michal Hocko <mhocko@...nel.org>
Cc:     Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
        Johannes Weiner <hannes@...xchg.org>,
        Mel Gorman <mgorman@...e.de>,
        Dave Hansen <dave.hansen@...el.com>,
        Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: respect the __GFP_NOWARN flag when warning about
 stalls

On 09/12/2017 01:36 AM, Mikulas Patocka wrote:
> 
> 
> On Mon, 11 Sep 2017, Michal Hocko wrote:
> 
>> On Mon 11-09-17 02:52:53, Mikulas Patocka wrote:
>>
>> This patch hasn't introduced this behavior. It deliberately skipped
>> warning on __GFP_NOWARN. This has been introduced later by 822519634142
>> ("mm: page_alloc: __GFP_NOWARN shouldn't suppress stall warnings"). I
>> disagreed [1] but overall consensus was that such a warning won't be
>> harmful. Could you be more specific why do you consider it wrong,
>> please?
> 
> I consider the warning wrong, because it warns when nothing goes wrong. 
> I've got 7 these warnings for 4 weeks of uptime. The warnings typically 
> happen when I run some compilation.
> 
> A process with low priority is expected to be running slowly when there's 
> some high-priority process, so there's no need to warn that the 
> low-priority process runs slowly.
> 
> What else can be done to avoid the warning? Skip the warning if the 
> process has lower priority?

We would have to consider (instead of jiffies) the time the process was
either running, or waiting on something that's related to memory
allocation/reclaim (page lock etc.). I.e. deduct the time the process
was runable but there was no available cpu. I expect however that such
level of detail wouldn't be feasible here, though?

Vlastimil

> Mikulas
> 
>> [1] http://lkml.kernel.org/r/20170125184548.GB32041@dhcp22.suse.cz
>>
>>>
>>> ---
>>>  mm/page_alloc.c |    2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> Index: linux-2.6/mm/page_alloc.c
>>> ===================================================================
>>> --- linux-2.6.orig/mm/page_alloc.c
>>> +++ linux-2.6/mm/page_alloc.c
>>> @@ -3923,7 +3923,7 @@ retry:
>>>  
>>>  	/* Make sure we know about allocations which stall for too long */
>>>  	if (time_after(jiffies, alloc_start + stall_timeout)) {
>>> -		warn_alloc(gfp_mask & ~__GFP_NOWARN, ac->nodemask,
>>> +		warn_alloc(gfp_mask, ac->nodemask,
>>>  			"page allocation stalls for %ums, order:%u",
>>>  			jiffies_to_msecs(jiffies-alloc_start), order);
>>>  		stall_timeout += 10 * HZ;
>>
>> -- 
>> Michal Hocko
>> SUSE Labs
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ