From: Benny Halevy <bhalevy@panasas.com>
To: Trond Myklebust <trond.myklebust@fys.uio.no>,
Fred Isaman <iisaman@netapp.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 3/3] SQUASHME: pnfs: filelayout: print_ds should use dprintk
Date: Thu, 28 Oct 2010 15:11:31 +0200 [thread overview]
Message-ID: <4CC97683.2010004@panasas.com> (raw)
In-Reply-To: <4CC89CBF.9010801@panasas.com>
On 2010-10-27 23:42, Benny Halevy wrote:
> On 2010-10-27 23:32, Trond Myklebust wrote:
>> On Wed, 2010-10-27 at 23:29 +0200, Benny Halevy wrote:
>>> On 2010-10-27 23:23, Trond Myklebust wrote:
>>>> On Wed, 2010-10-27 at 23:00 +0200, Benny Halevy wrote:
>>>>> On 2010-10-27 22:17, Fred Isaman wrote:
>>>>>> On Wed, Oct 27, 2010 at 4:06 PM, Benny Halevy <bhalevy@panasas.com> wrote:
>>>>>>> On 2010-10-27 21:49, Fred Isaman wrote:
>>>>>>>> The change to printk was in response to Trond's complaint about
>>>>>>>> successive dprintks.
>>>>>>>>
>>>>>>>> Instead, the following would work:
>>>>>>>>
>>>>>>>>
>>>>>>>> diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
>>>>>>>> index 5f52e6f..2ce393c 100644
>>>>>>>> --- a/fs/nfs/nfs4filelayout.c
>>>>>>>> +++ b/fs/nfs/nfs4filelayout.c
>>>>>>>> @@ -585,7 +585,8 @@ filelayout_commit(struct nfs_write_data *data, int sync)
>>>>>>>> }
>>>>>>>
>>>>>>> If we're going this way, the ifdebug could cover the following
>>>>>>> printout as well...
>>>>>>>
>>>>>>
>>>>>> Did you mean preceding printout? By the way - the complaint about
>>>>>
>>>>> Yeah, preceding the call to print_ds (following my comment :)
>>>>>
>>>>>> successive dprintks was regarding
>>>>>> print_ds_list repeatedly calling print_ds, which at the time used dprintk.
>>>>>
>>>>> Why do we care to optimize the debug case so much?
>>>>> print_ds_list is already calling print_ds inside ifdebug(FACILITY)
>>>>> so the common, non-debug case is optimized correctly. I.e. we don't
>>>>> repeatedly check the debug flag normally.
>>>>
>>>> It's not about optimizing the debug case. It's about avoiding having to
>>>> check ifdebug(FACILITY) all the time when we're _not_ debugging.
>>>
>>> Right, and so we do, as the whole loop in print_ds_list is enclosed
>>> in ifdebug(FACILITY).
>>
>> In that case, I agree: the whole thing can be converted to use ordinary
>> printks...
>
> The point is it has a singular caller outside of this loop for which
> the caller needs to check ifdebug(FACILITY) before calling print_ds.
> Not a big deal, but I think it'd be cleaner if print_ds will do a dprintk
> to simplify its singular usage, while the cost of that will be extra tests
> when called, possibly many times, in debug mode from print_ds_list.
Nevermind, I just merged Fred's patch instead.
No need to spend that much energy on cosmetics in this case :)
Benny
>
> Benny
>
>>
>> Trond
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2010-10-28 13:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-27 18:21 [PATCH 1/4] pnfs fixes Benny Halevy
2010-10-27 18:22 ` [PATCH 1/1] SQUASHME: pnfsd-files: update layout stateid properly Benny Halevy
2010-10-27 18:23 ` [PATCH 1/1] pnfs: do not change layout stateid when dropping layouts Benny Halevy
2010-10-27 18:24 ` [PATCH 2/3] pnfs: mark page with error in readpage_async_filler when crossing lsegs Benny Halevy
2010-10-27 18:24 ` [PATCH 3/3] SQUASHME: pnfs: filelayout: print_ds should use dprintk Benny Halevy
2010-10-27 19:49 ` Fred Isaman
2010-10-27 20:06 ` Benny Halevy
2010-10-27 20:17 ` Fred Isaman
2010-10-27 21:00 ` Benny Halevy
2010-10-27 21:23 ` Trond Myklebust
2010-10-27 21:29 ` Benny Halevy
2010-10-27 21:32 ` Trond Myklebust
2010-10-27 21:42 ` Benny Halevy
2010-10-28 13:11 ` Benny Halevy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CC97683.2010004@panasas.com \
--to=bhalevy@panasas.com \
--cc=iisaman@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@fys.uio.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).