lkml.org 
[lkml]   [2012]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 2/9] ext4: Use pr_fmt and pr_<level>
    From
    Date
    On Thu, 2012-03-22 at 18:02 +0100, Jiri Slaby wrote:
    > On 03/20/2012 10:46 AM, Joe Perches wrote:
    > > On Tue, 2012-03-20 at 10:25 +0100, Jiri Slaby wrote:
    > >> On 03/20/2012 10:21 AM, Joe Perches wrote:
    > >>> the ath5k pr_ conversion patches are to
    > >>> standardize prefixes and to reduce code size by
    > >>> centralizing tests.
    > >> What is the "standard" prefix?
    > > KBUILD_MODNAME
    >
    > Instead, we should switch as many printks to dev_* and similar as
    > possible, right?

    I believe logging message use should be selected
    to be as specific as possible (from high to low):

    o <subsystem>_<level>
    o netif_<level>
    o netdev_<level>
    o dev_<level>
    o pr_<level>
    o printk(KERN_<LEVEL>

    > They are standard and provide a good interface for
    > extensions: one has a device to work with. This is something what pr_*
    > does not offer.

    I completely agree.

    I'd like to see some new subsystem prefixes
    created and used as well. Maybe:

    fs_<level> (like Ted's ext4_<foo>)
    io_<level> (scsi/ide/mtd)
    mm_<level>

    There are probably a few others like
    cpu/video/sound that might be useful.

    > Frankly, moving the debug code to a separate function should make the
    > code rather faster. By moving the unlikely code out of the instruction
    > cache.

    I think it's better still to eliminate debug
    code altogether via if (0) when reasonable
    or use dynamic_debug (jump_tables) when
    overall code size isn't an issue.

    cheers, Joe



    \
     
     \ /
      Last update: 2012-03-22 18:45    [W:2.479 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site