From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752988AbcAGV3O (ORCPT ); Thu, 7 Jan 2016 16:29:14 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:35948 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752073AbcAGV3N (ORCPT ); Thu, 7 Jan 2016 16:29:13 -0500 Date: Thu, 7 Jan 2016 13:29:11 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Vlastimil Babka cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Joonsoo Kim , Minchan Kim , Sasha Levin , "Kirill A. Shutemov" , Mel Gorman , Michal Hocko Subject: Re: [PATCH v2 9/9] mm, oom: print symbolic gfp_flags in oom warning In-Reply-To: <1448368581-6923-10-git-send-email-vbabka@suse.cz> Message-ID: References: <1448368581-6923-1-git-send-email-vbabka@suse.cz> <1448368581-6923-10-git-send-email-vbabka@suse.cz> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 24 Nov 2015, Vlastimil Babka wrote: > It would be useful to translate gfp_flags into string representation when > printing in case of an OOM, especially as the flags have been undergoing some > changes recently and the script ./scripts/gfp-translate needs a matching source > version to be accurate. > > Example output: > > a.out invoked oom-killer: order=0, oom_score_adj=0, gfp_mask=0x24280ca(GFP_HIGHUSER_MOVABLE|GFP_ZERO) > Is there a way that we can keep the order of the fields so that anything parsing the kernel log for oom kills doesn't break? The messages printed to the kernel log are the only (current) way to determine that the kernel killed something so we should be careful not to break anything parsing them, and this is a common line to look for.