From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752743AbbLDOPu (ORCPT ); Fri, 4 Dec 2015 09:15:50 -0500 Received: from mx2.suse.de ([195.135.220.15]:46631 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751185AbbLDOPs (ORCPT ); Fri, 4 Dec 2015 09:15:48 -0500 Subject: Re: [PATCH 1/2] mm, printk: introduce new format string for flags To: yalin wang , Rasmus Villemoes References: <20151125143010.GI27283@dhcp22.suse.cz> <1448899821-9671-1-git-send-email-vbabka@suse.cz> <4EAD2C33-D0E4-4DEB-92E5-9C0457E8635C@gmail.com> <565F5CD9.9080301@suse.cz> <1F60C207-1CC2-4B28-89AC-58C72D95A39D@gmail.com> <87a8psq7r6.fsf@rasmusvillemoes.dk> <89A4C9BC-47F6-4768-8AA8-C1C4EFEFC52D@gmail.com> Cc: "open list:MEMORY MANAGEMENT" , linux-kernel , Andrew Morton , Joonsoo Kim , Minchan Kim , Sasha Levin , "Kirill A. Shutemov" , Mel Gorman , Michal Hocko From: Vlastimil Babka Message-ID: <5661A011.2010400@suse.cz> Date: Fri, 4 Dec 2015 15:15:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <89A4C9BC-47F6-4768-8AA8-C1C4EFEFC52D@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/03/2015 07:38 PM, yalin wang wrote: > that’s all, see cpumask_pr_args(masks) macro, > it also use macro and %*pb to print cpu mask . > i think this method is not very complex to use . Well, one also has to write the appropriate translation tables. > search source code , > there is lots of printk to print flag into hex number : > $ grep -n -r 'printk.*flag.*%x’ . > it will be great if this flag string print is generic. I think it can always be done later, this is an internal API. For now we just have 3 quite generic flags, so let's not over-engineer things right now. > Thanks From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by kanga.kvack.org (Postfix) with ESMTP id 929966B0258 for ; Fri, 4 Dec 2015 09:15:50 -0500 (EST) Received: by wmec201 with SMTP id c201so66908728wme.1 for ; Fri, 04 Dec 2015 06:15:49 -0800 (PST) Received: from mx2.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id rz9si18824466wjb.38.2015.12.04.06.15.47 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 04 Dec 2015 06:15:48 -0800 (PST) Subject: Re: [PATCH 1/2] mm, printk: introduce new format string for flags References: <20151125143010.GI27283@dhcp22.suse.cz> <1448899821-9671-1-git-send-email-vbabka@suse.cz> <4EAD2C33-D0E4-4DEB-92E5-9C0457E8635C@gmail.com> <565F5CD9.9080301@suse.cz> <1F60C207-1CC2-4B28-89AC-58C72D95A39D@gmail.com> <87a8psq7r6.fsf@rasmusvillemoes.dk> <89A4C9BC-47F6-4768-8AA8-C1C4EFEFC52D@gmail.com> From: Vlastimil Babka Message-ID: <5661A011.2010400@suse.cz> Date: Fri, 4 Dec 2015 15:15:45 +0100 MIME-Version: 1.0 In-Reply-To: <89A4C9BC-47F6-4768-8AA8-C1C4EFEFC52D@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: owner-linux-mm@kvack.org List-ID: To: yalin wang , Rasmus Villemoes Cc: "open list:MEMORY MANAGEMENT" , linux-kernel , Andrew Morton , Joonsoo Kim , Minchan Kim , Sasha Levin , "Kirill A. Shutemov" , Mel Gorman , Michal Hocko On 12/03/2015 07:38 PM, yalin wang wrote: > thata??s all, see cpumask_pr_args(masks) macro, > it also use macro and %*pb to print cpu mask . > i think this method is not very complex to use . Well, one also has to write the appropriate translation tables. > search source code , > there is lots of printk to print flag into hex number : > $ grep -n -r 'printk.*flag.*%xa?? . > it will be great if this flag string print is generic. I think it can always be done later, this is an internal API. For now we just have 3 quite generic flags, so let's not over-engineer things right now. > Thanks -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org