[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130110113616.GG13304@suse.de>
Date: Thu, 10 Jan 2013 11:36:16 +0000
From: Mel Gorman <mgorman@...e.de>
To: Cody P Schafer <cody@...ux.vnet.ibm.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 0/2] Add decoder for GFP masks to tools.
On Tue, Jan 08, 2013 at 03:24:13PM -0800, Cody P Schafer wrote:
> I needed to decode some gfp_masks to debug an oom-killer invocation, and wrote
> this tool to avoid doing the decoding manually.
>
> Bad things about this: slightly hacky use of code intended for use with ftrace,
> splitting linux/gfp.h into 2 parts.
>
> Good things: No additional places need modification to keep the decoder up to
> date, no mistakes from manual gfp_mask decoding.
>
Any particular reason you did not use scripts/gfp-translate?
$ bash ./scripts/gfp-translate 0x1000d0
Source: /home/mel/git-public/linux-2.6
Parsing: 0x1000d0
#define ___GFP_WAIT 0x10
#define ___GFP_IO 0x40
#define ___GFP_FS 0x80
#define ___GFP_KMEMCG 0x100000
Script is dumb as rocks, requires access to the source code and does not
translate flag combinations into something like GFP_KERNEL but it's usually
sufficient. I'm not pushed either way but if you want to push your tool
then the patch should also delete scripts/gfp-translate.
--
Mel Gorman
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists