linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>
To: Minwoo Im <minwoo.im.dev@gmail.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	"axboe@kernel.dk" <axboe@kernel.dk>
Subject: Re: [PATCH 3/5] block: allow block_dump to print all REQ_OP_XXX
Date: Wed, 3 Jul 2019 02:26:22 +0000	[thread overview]
Message-ID: <DM6PR04MB57546ECC4CFDDB5535E3382586FB0@DM6PR04MB5754.namprd04.prod.outlook.com> (raw)
In-Reply-To: 20190703005023.GC19081@minwoo-desktop

On 7/2/19 5:50 PM, Minwoo Im wrote:
>> diff --git a/block/blk-core.c b/block/blk-core.c
>> index 5143a8e19b63..9855c5d5027d 100644
>> --- a/block/blk-core.c
>> +++ b/block/blk-core.c
>> @@ -1127,17 +1127,15 @@ EXPORT_SYMBOL_GPL(direct_make_request);
>>   */
>>  blk_qc_t submit_bio(struct bio *bio)
>>  {
>> +	unsigned int count = bio_sectors(bio);
> Chaitanya,
>
> Could it have a single empty line right after this just like you have
> for the if-statement below for the block_dump.  It's just a nitpick.

Yeah, again can be done at the time of applying patch, if Jens is okay
with that.

Otherwise I can send V2.

>
>>  	/*
>>  	 * If it's a regular read/write or a barrier with data attached,
>>  	 * go through the normal accounting stuff before submission.
>>  	 */
>>  	if (bio_has_data(bio)) {
>> -		unsigned int count;
>>  
>>  		if (unlikely(bio_op(bio) == REQ_OP_WRITE_SAME))
>>  			count = queue_logical_block_size(bio->bi_disk->queue) >> 9;
>> -		else
>> -			count = bio_sectors(bio);
>>  
>>  		if (op_is_write(bio_op(bio))) {
>>  			count_vm_events(PGPGOUT, count);
>> @@ -1145,15 +1143,16 @@ blk_qc_t submit_bio(struct bio *bio)
>>  			task_io_account_read(bio->bi_iter.bi_size);
>>  			count_vm_events(PGPGIN, count);
>>  		}
>> +	}
>>  
>> -		if (unlikely(block_dump)) {
>> -			char b[BDEVNAME_SIZE];
>> -			printk(KERN_DEBUG "%s(%d): %s block %Lu on %s (%u sectors)\n",
>> -			current->comm, task_pid_nr(current),
>> -				blk_op_str(bio_op(bio)),
>> -				(unsigned long long)bio->bi_iter.bi_sector,
>> -				bio_devname(bio, b), count);
>> -		}
>> +	if (unlikely(block_dump)) {
>> +		char b[BDEVNAME_SIZE];
>> +
>> +		printk(KERN_DEBUG "%s(%d): %s block %Lu on %s (%u sectors)\n",
>> +		current->comm, task_pid_nr(current),
>> +			blk_op_str(bio_op(bio)),
>> +			(unsigned long long)bio->bi_iter.bi_sector,
>> +			bio_devname(bio, b), count);
> It would be great if non-data command is traced, I think.
>
> Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com>
>



  reply	other threads:[~2019-07-03  2:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01 21:57 [PATCH 0/5] block: udpate debug messages with blk_op_str() Chaitanya Kulkarni
2019-07-01 21:57 ` [PATCH 1/5] block: update error message for bio_check_ro() Chaitanya Kulkarni
2019-07-03  0:42   ` Minwoo Im
2019-07-03  2:24     ` Chaitanya Kulkarni
2019-07-01 21:57 ` [PATCH 2/5] block: update error message in submit_bio() Chaitanya Kulkarni
2019-07-03  0:43   ` Minwoo Im
2019-07-01 21:57 ` [PATCH 3/5] block: allow block_dump to print all REQ_OP_XXX Chaitanya Kulkarni
2019-07-03  0:50   ` Minwoo Im
2019-07-03  2:26     ` Chaitanya Kulkarni [this message]
2019-07-01 21:57 ` [PATCH 4/5] mm: update block_dump comment Chaitanya Kulkarni
2019-07-08 18:49   ` Chaitanya Kulkarni
2019-07-01 21:57 ` [PATCH 5/5] Documentation/laptop: add block_dump documentation Chaitanya Kulkarni
2019-07-08 18:49   ` Chaitanya Kulkarni

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=DM6PR04MB57546ECC4CFDDB5535E3382586FB0@DM6PR04MB5754.namprd04.prod.outlook.com \
    --to=chaitanya.kulkarni@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minwoo.im.dev@gmail.com \
    /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).