From patchwork Mon Jul 1 21:57:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 11026887 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5C8C114F6 for ; Mon, 1 Jul 2019 21:57:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50A26287BF for ; Mon, 1 Jul 2019 21:57:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 433B4287C3; Mon, 1 Jul 2019 21:57:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2BA7287BF for ; Mon, 1 Jul 2019 21:57:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726439AbfGAV5p (ORCPT ); Mon, 1 Jul 2019 17:57:45 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:61227 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726678AbfGAV5p (ORCPT ); Mon, 1 Jul 2019 17:57:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1562018264; x=1593554264; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=OqaUD3tyvurJZF4iy8UPTGJAVxI+8vvw75Zn9sBYYZc=; b=JL8GBMnD50HsHxgTVbE/yudd7jbD/7ZzaeJ1kmcC2u4H3RKLDFj0uAoH FMfGIutJ2q9Sq765r8PJg40eiIySg1OIlYLypuBCBDKKXUu4pyzxI2QgA vX/hVCmuz+5SK8d8mHdsT0kQnJtb9sw1zIrWw4zOHs86b662iDiqgUmoT z8luDl6zCzrqtxVpoiL6jPwKL8cfvgV1ljVoxA6A57LJ3IxhtAgQCkVcI ANQDD9KsExm3ERXg3kOf5GVI0UhsegHo4Dff5XIOaFbqmoKu41PMowi44 KxFELNp6a29fN7h/r9EMRWk/z7aPwGlL0JAx5u+flxrH/nu95YSvUFZTb Q==; X-IronPort-AV: E=Sophos;i="5.63,440,1557158400"; d="scan'208";a="113190420" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 02 Jul 2019 05:57:44 +0800 IronPort-SDR: HYLL+WjNhsxeRYljgq/T35Urm3a2KyIalpfV93Hdu6Rmwg6/bqPsnj1uDEOxgeWjAcUTNCBbGH ZYXNT9qt2nSD2WAIEhxRZYhhYxpddih7Or/L12Sp6cEd5lKMI97jBxdUFM92svfrN06osAv5SS +brvNezWetGgDMHmuMMYD5jLM2b1Mkfx1O2fDN1VEoY46wNsB69dWZU0iW53raJ8kA8bAfnd8J bysbvfrX2j5ciEK9Xr6g0823rtUEn+Cm4TcUzyhtWhzDxPLE5Vq7p+HE8b4MwtYxyMVUnxgb9h tYTZZZl4ehp85Ru/7f9kuKtl Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 01 Jul 2019 14:56:44 -0700 IronPort-SDR: wxv1jtI14V0dynykEUh694Gd+y7cQjWb6GNJY2Fh1io9Yv2yWDaMNS0U/JIdWHAae8H+x4yL1W N8sJUPfXtNew4R3FGvi5vtEkUUuC+o/5h7G8ONNS4DBhdnjyj/KMZDZp04wpV/yvF7Z8u/99sA uBVwShEzK5Us0emedzyRYuwUbykkGHGjaXjaDb5eWT8VBIRhR7ziI9lLDS6iqG/8fpLe8oLFHM NE+ShJ7xGWHPzrWAT26BbsgntAdjRye8w3WoQUUyGZwqC1uRL8WOE9kirSgjy8CNKNo5LagRUC I1I= Received: from cvenusqemu.hgst.com ([10.202.66.73]) by uls-op-cesaip02.wdc.com with ESMTP; 01 Jul 2019 14:57:44 -0700 From: Chaitanya Kulkarni To: linux-mm@kvack.org, linux-block@vger.kernel.org Cc: bvanassche@acm.org, axboe@kernel.dk, Chaitanya Kulkarni Subject: [PATCH 1/5] block: update error message for bio_check_ro() Date: Mon, 1 Jul 2019 14:57:22 -0700 Message-Id: <20190701215726.27601-2-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190701215726.27601-1-chaitanya.kulkarni@wdc.com> References: <20190701215726.27601-1-chaitanya.kulkarni@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The existing code in the bio_check_ro() relies on the op_is_write(). op_is_write() checks for the last bit in the bio_op(). Now that we have multiple REQ_OP_XXX with last bit set to 1 such as, (from blk_types.h): /* write sectors to the device */ REQ_OP_WRITE = 1, /* flush the volatile write cache */ REQ_OP_DISCARD = 3, /* securely erase sectors */ REQ_OP_SECURE_ERASE = 5, /* write the same sector many times */ REQ_OP_WRITE_SAME = 7, /* write the zero filled sector many times */ REQ_OP_WRITE_ZEROES = 9, it is hard to understand which bio op failed in the bio_check_ro(). Modify the error message in bio_check_ro() to print correct REQ_OP_XXX with the help of blk_op_str(). Signed-off-by: Chaitanya Kulkarni Reviewed-by: Minwoo Im --- block/blk-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 5d1fc8e17dd1..47c8b9c48a57 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -786,9 +786,9 @@ static inline bool bio_check_ro(struct bio *bio, struct hd_struct *part) return false; WARN_ONCE(1, - "generic_make_request: Trying to write " - "to read-only block-device %s (partno %d)\n", - bio_devname(bio, b), part->partno); + "generic_make_request: Trying op %s on the " + "read-only block-device %s (partno %d)\n", + blk_op_str(op), bio_devname(bio, b), part->partno); /* Older lvm-tools actually trigger this */ return false; } From patchwork Mon Jul 1 21:57:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 11026891 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 91515138D for ; Mon, 1 Jul 2019 21:57:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84D91287C2 for ; Mon, 1 Jul 2019 21:57:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 77341287C8; Mon, 1 Jul 2019 21:57:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2570F287C2 for ; Mon, 1 Jul 2019 21:57:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726793AbfGAV5u (ORCPT ); Mon, 1 Jul 2019 17:57:50 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:49962 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726678AbfGAV5u (ORCPT ); Mon, 1 Jul 2019 17:57:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1562018270; x=1593554270; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=9J1OfplonnbynoEAMgNYcUvjFmcuTdb/IR5OisFEtak=; b=OBA5OPaSvE7ob8A+CYYmji9v3XLt7jWagLW/nMNdbEh798bIOjCW+Jlp xd4LHxcdSxCuPcml4+fVTO+sv7U1xD04q/plHxyGn8ZZ4KbFAQgclZUst cYQBrKnpLOzJ12GpLTkppAADIk/nimc0+47lGpPUjYNfs8m0H2Yck1pQc AY7QdBXvVSOFPMuQ60egEdJQizsb7xPT3msyjQhbYwqOxlAX8VICaduYk WAaKTkyq3MJbUN3kfa3YaONPjdfYN8Un/T8fUH1tRdkcfzLsLnKwTibYg NAoWVN22g34AB20v9/ClSyaJSSfgjuwhaufUQq3o2X/Kn6yFmJM6jl7XF g==; X-IronPort-AV: E=Sophos;i="5.63,440,1557158400"; d="scan'208";a="113614919" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 02 Jul 2019 05:57:50 +0800 IronPort-SDR: y3GDar/WQhP6iyjZiGCCQWrinmOvFnEb/KLly0HKWFMMcVaAJjnJcL6akAMj5zt653pvGkwF3x fjbeSDeGsOsUnL03OMz5TeTuoVga0JONjAmIge81e4uTGAo2/xzntqzDHCK1BLVk4gfJq3MiNP w2+WUJwJLl0oA1JBHa5dkvd2rf5RLNvuBeC6Whv6XK5ogG4fqCNTxBM6f3NZdE8emKPGSZAfvk y1R36f+8QYil4UBVNPkddDPPjdQPwrPrH1qkQ7WsJtIhBjKq91kEE+0o4qoaNKMETbkKVD62Kf ASLpWwOHWrHe4PKnoCrb5hwj Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 01 Jul 2019 14:56:50 -0700 IronPort-SDR: RUT0zDud5mdeTiDe1oPpuNFjDkJ3uuMy6naMhD7jlFJOo5Lx94cNdS/Nkt7n9zdRsqDaX8I6aS kpaO5xs/asgCHLZQqRzj68/bAQY1ftPJ1LuuI+Mm0adufqE1zU2V1QalNgVa5v+cw+tQbBCrsx z5HtwnIeWwhelc9wuGhNRmFmJqPGDwu9W68q3GBRjOdrZ8nIYKVL2ZoE53gzE6nYvBvV79r5Oi iHsMW4+fL3q2Caum4SGUrUHvk/O18aCQYKP5YevyAbm4yOdXJpq0lIPCo89V0C6rqMGJesnYkn MW0= Received: from cvenusqemu.hgst.com ([10.202.66.73]) by uls-op-cesaip02.wdc.com with ESMTP; 01 Jul 2019 14:57:50 -0700 From: Chaitanya Kulkarni To: linux-mm@kvack.org, linux-block@vger.kernel.org Cc: bvanassche@acm.org, axboe@kernel.dk, Chaitanya Kulkarni Subject: [PATCH 2/5] block: update error message in submit_bio() Date: Mon, 1 Jul 2019 14:57:23 -0700 Message-Id: <20190701215726.27601-3-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190701215726.27601-1-chaitanya.kulkarni@wdc.com> References: <20190701215726.27601-1-chaitanya.kulkarni@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The existing code in the submit_bio() relies on the op_is_write(). op_is_write() checks for the last bit in the bio_op() and we only print WRITE or READ as a bio_op(). It is hard to understand which bio op based on READ/WRITE in submit_bio() with addition of newly discussed REQ_OP_XXX. [1] Modify the error message in submit_bio() to print correct REQ_OP_XXX with the help of blk_op_str(). [1] https://www.spinics.net/lists/linux-block/msg41884.html. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Minwoo Im --- block/blk-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-core.c b/block/blk-core.c index 47c8b9c48a57..5143a8e19b63 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1150,7 +1150,7 @@ blk_qc_t submit_bio(struct bio *bio) char b[BDEVNAME_SIZE]; printk(KERN_DEBUG "%s(%d): %s block %Lu on %s (%u sectors)\n", current->comm, task_pid_nr(current), - op_is_write(bio_op(bio)) ? "WRITE" : "READ", + blk_op_str(bio_op(bio)), (unsigned long long)bio->bi_iter.bi_sector, bio_devname(bio, b), count); } From patchwork Mon Jul 1 21:57:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 11026895 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BE06414F6 for ; Mon, 1 Jul 2019 21:57:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B2B8A287BF for ; Mon, 1 Jul 2019 21:57:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A74D2287C3; Mon, 1 Jul 2019 21:57:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 511D7287BF for ; Mon, 1 Jul 2019 21:57:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726811AbfGAV55 (ORCPT ); Mon, 1 Jul 2019 17:57:57 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:61244 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726678AbfGAV55 (ORCPT ); Mon, 1 Jul 2019 17:57:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1562018277; x=1593554277; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=MbHOnCWpKU9OhNQ3wNRN8l4gA1/62SoaCYINRxhsjOE=; b=KADS1dQg4EU8mbhayi4lwtDMVqy1/AZq7XFlZ0iE2MZq93d3hNbrTWlL mLtH4gklBoX+iXQOE0f6PiuSdl5xN6sewsBYu5sJx180CvwQzCSC5WWIL vX66LVl8ju69JpJueAnZN5PjuH0yQ/4o1Y1OqfjPkIQ8a7YDTZSXmYNE+ 0K7aJeHvWizPSjGbAYz0ex3sgXj2BhUPLDPu5CDVEnpBbunPDOpJt3vGw VwOABnPAN3QHh/kBdVJUGyIEAMN1ji1crbYs4krByxz7GUPIfIcj2/JeS 9MlVySUBYlhFni5o0CzChLLYuDsGoJKPPv0OdWJ0BjLVZyIDh8vv8MKqp g==; X-IronPort-AV: E=Sophos;i="5.63,440,1557158400"; d="scan'208";a="113190428" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 02 Jul 2019 05:57:57 +0800 IronPort-SDR: +DvYhdhzlO9VHk6HS5cu89hX56AqM2iSrCon2n4SEzVCON3Tfsx6jInRgo4tOVCWv8wGEWL3x+ bb24qAiqw4sDGGK7RNokGWnsM/1/hX/pIo/an1S3P93TLecSdT38rcXdULhj43TJUQS39vgKrl 3fnn8iDG23PWnahrRgzbzakWbCdFvRr4hLx0Hng2YARVKu3q/umb7+3HbWoyG+w/ppXSoyLzuf qe5EWAPZHDltUlg1jGD5eK8ILPE80WA6KXHJ0VppKDPZlH+e5Hv2EOM7F+Vn2a2vJ0cYC+4rVp c0q5jg9MrVqhpVwit5v5g2v/ Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 01 Jul 2019 14:56:57 -0700 IronPort-SDR: CL+xf59TlgjtZyTlFRdcDLuFt75xQy3gXKfSxFmbCWJT5LpCjDOhLvVhJA8iyfcFX8teiNIU61 JS6nyhX2Ks1O0rTthsOcqUEA8YwUv0TSYQVGKXjnChLzxvglb4z6E2l2b22Mx69PqCKDUgabxq z+flC2nm/UzUtye/ZE8/A8OzzamaJyVuGujFyj+kM5z3Ul371Uu9BPqEO6baKu5HavSUMM/V2z T3UMAzRyJNRY+iQgrLC/LgbFgJNzaxW0R7TuHnASZhh7TGWl6LIKon4o4jEMddBsNPFxtsL3Cn T7w= Received: from cvenusqemu.hgst.com ([10.202.66.73]) by uls-op-cesaip02.wdc.com with ESMTP; 01 Jul 2019 14:57:57 -0700 From: Chaitanya Kulkarni To: linux-mm@kvack.org, linux-block@vger.kernel.org Cc: bvanassche@acm.org, axboe@kernel.dk, Chaitanya Kulkarni Subject: [PATCH 3/5] block: allow block_dump to print all REQ_OP_XXX Date: Mon, 1 Jul 2019 14:57:24 -0700 Message-Id: <20190701215726.27601-4-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190701215726.27601-1-chaitanya.kulkarni@wdc.com> References: <20190701215726.27601-1-chaitanya.kulkarni@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In the current implementation when block_dump is enabled we only report bios with data. In this way we are not logging the REQ_OP_WRITE_ZEROES, REQ_OP_DISCARD or any other operations without data etc. This patch allows all bios with and without data to be reported when block_dump is enabled and adjust the existing code. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Minwoo Im --- --- block/blk-core.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) 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); /* * 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); } return generic_make_request(bio); From patchwork Mon Jul 1 21:57:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 11026899 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 91CAF138D for ; Mon, 1 Jul 2019 21:58:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 864F128793 for ; Mon, 1 Jul 2019 21:58:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7A91C287BF; Mon, 1 Jul 2019 21:58:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26F6528793 for ; Mon, 1 Jul 2019 21:58:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726830AbfGAV6E (ORCPT ); Mon, 1 Jul 2019 17:58:04 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:49978 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726678AbfGAV6E (ORCPT ); Mon, 1 Jul 2019 17:58:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1562018284; x=1593554284; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=SM4vBhjIMuIjQIIkPMmNSjGDUMbO4rTKMZzMc8UskaU=; b=ZZIFA9HVeSYt9Y8HlXxKic9FrxKeWNYAzpDjhnh8guDtK9L7jXKwK6Wm w105ZKNaZzep5NMpbluGb1G7bojNk5D90MDLORDtaqMxz16dShWHpfPON THSSTYs7mCdkLDF9LxOpdZ5tWTpzwaP6fBLVAvRUjeKlYfh8FMhDmSXEE 8Sz084LfWBifFBxlMbxMBv0Ox0PquI8W/UbS8Xalo+TYS2RBCRY+polIS t68MZQDLxytiaRyPN9TPjSYGcNVX0Cfzt6diGVhrp8NR2Jh8Bq8KeUzzg dUzY7QPNKoq7mvHYHrsn3koDjEwSu5eoF4qzAkFAuJKICs9uFek1/Yx7b Q==; X-IronPort-AV: E=Sophos;i="5.63,440,1557158400"; d="scan'208";a="113614943" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 02 Jul 2019 05:58:04 +0800 IronPort-SDR: t9a3E+gqKDrf65hKIG62GaXPU70B+9E1zVCG9p4NjiXFBgQmNiVIYc8DpmqnRNon0mXWL4/hpR LT0qxUMICaBnBMqUW+qb3Qi7X+pieonfX2MoevSqYiCDxVxMwhKvbeIBhhNRnqSs6cBTg3TV0e yTHKRSzUv8umB1Kq6zM87D00/qLHKJGF8WQ8Hn/UrQr3F1cKDCXP8OC/l7oWjZVd/jdxygxZ6o VTUD/bRiy+d53Z8/BUt/i/stnqXm0qIwSKsdxGSgyTuUMfbxVGM0FBZCs+WNaQ7gXDjVImyc1u n+3tpW5jBkAprvQgdwk3Qkcb Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 01 Jul 2019 14:57:07 -0700 IronPort-SDR: e+BRmQAwH57/flmFvsQ6Pi8GWmwJl0oZ71gtjgNdmCq2EN3CldpqQ1InjNWVtGq0B1oBeOBsd+ kFszZuOSH18RLPIwDQuKI4Xt94EU0l8vAv40wQPezVoRtOtGcS3DhfqFKo3eZoEEF7cqOlXdaL bv1kLKT8vZz+a1WGE8clxQDtDrXl/ApwMerjBGhUmCmmTEmTFNhoRp6K1sboM6C2xXyBHPjxmY h9eYIBUbtUcMBrxqcroJweQRK4ZibJt9YOvzlfmlJ5tyPVhAc+V2PrYsnrLymBfxnDADKmxVAS QQI= Received: from cvenusqemu.hgst.com ([10.202.66.73]) by uls-op-cesaip02.wdc.com with ESMTP; 01 Jul 2019 14:58:04 -0700 From: Chaitanya Kulkarni To: linux-mm@kvack.org, linux-block@vger.kernel.org Cc: bvanassche@acm.org, axboe@kernel.dk, Chaitanya Kulkarni Subject: [PATCH 4/5] mm: update block_dump comment Date: Mon, 1 Jul 2019 14:57:25 -0700 Message-Id: <20190701215726.27601-5-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190701215726.27601-1-chaitanya.kulkarni@wdc.com> References: <20190701215726.27601-1-chaitanya.kulkarni@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With respect to the changes in the submit_bio() in the earlier patch now we report all the REQ_OP_XXX associated with bio along with REQ_OP_READ and REQ_OP_WRITE (READ/WRITE). Update the following comment for block_dump variable to reflect the change. Signed-off-by: Chaitanya Kulkarni --- mm/page-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page-writeback.c b/mm/page-writeback.c index bdbe8b6b1225..ef299f95349f 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -109,7 +109,7 @@ EXPORT_SYMBOL_GPL(dirty_writeback_interval); unsigned int dirty_expire_interval = 30 * 100; /* centiseconds */ /* - * Flag that makes the machine dump writes/reads and block dirtyings. + * Flag that makes the machine dump block layer requests and block dirtyings. */ int block_dump; From patchwork Mon Jul 1 21:57:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 11026903 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E8140138D for ; Mon, 1 Jul 2019 21:58:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9F5A28793 for ; Mon, 1 Jul 2019 21:58:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CAAE3287C2; Mon, 1 Jul 2019 21:58:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 70A5928793 for ; Mon, 1 Jul 2019 21:58:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726878AbfGAV6M (ORCPT ); Mon, 1 Jul 2019 17:58:12 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:56724 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726688AbfGAV6L (ORCPT ); Mon, 1 Jul 2019 17:58:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1562018291; x=1593554291; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=b0wGW7WtfWxUwKfj2wVFwZxNHKIT6iMJAeEE2CY/GA4=; b=SG6nNlNiJDoIOUPgDjDT1vEwCaQVHRxjRTUDPplqYINBPUJeG8vtgEMZ SHI4HrqsJSIuUNP5KVOT2/MqKFd58+QJ4Gp+Ne9Knp6WWWE5k80YZRkiV +gq6av/fAFiDEJbJzG7GMA/dMFW3+GGq+hrRiZ9dFFMLfTxoSODHzdczj 6lq1TFpCKWG9SOVKFiY+ytJ320nuBtvkAB5/WK/gwrBRlzN0EwTv+Nwu4 odEY2VYvS/0XOWJ3DFX1QsXX3y/CO0adbC9aAF2Ecm22l7Qb/rH01k8ND B3ERhVhcb3X5jveK3wZ/Ix/HI8zXHP5nMEzOYERJZrkV/qQdgkVuuMwPE Q==; X-IronPort-AV: E=Sophos;i="5.63,440,1557158400"; d="scan'208";a="116844042" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 02 Jul 2019 05:58:11 +0800 IronPort-SDR: EVsx4/4XKkXqYlxt9dv6fEAKdFor7neKkpSKkUHf9yYsSYH+dGVXgjgTx1qsRJWxIvUyjYMHIP I18UOf+7JgZdoP9g5a4EHcms9zhum2A2/PAdrYYvjvegDU2kutHExz7F2mRydk3qDbzROxgi54 PPcpu+C9Q5r2KRGqpluZJ3eh74NjZN+pdD9zEUVOcK0WDfaAL0edbV+9Fx5WRvU+KW3+9H+s/U e9yrbDzXgSttP06vCjU099bQ7UyGqkVJU8j9/J+M6ZMmRw+ckWjdrtqWQDglIaMIKDUD0XRca4 kG5WqQUllHpQ1DimyqDpHACN Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 01 Jul 2019 14:57:13 -0700 IronPort-SDR: AABjtBQ8ZjxtlIypq0AuDMGuICj3Ru7OQR6RTokwwI5NwnheQDs9XZu6EHSysDkGvnSbjLSLzk svQHsZ3L9KuVfcFTjFKgPOsuSl7tPlG11lsjBb8z5kXGyUSeWfzv8y2JNrHN9XFqAP9GIoh801 6/k7//Wxd+PiVP+eMja3fbegfEx0pWIXUEx/YSComqBkOzV5tvEeCB40Ty18Wl8YUlGpamcA0W YnMn0/OE8nFdC37M/MT1FRhMxXORwaN4jwQ92KCK2O3IsgCDvM1qCknYbY7bB2yB2W4O2NYyqp t5U= Received: from cvenusqemu.hgst.com ([10.202.66.73]) by uls-op-cesaip02.wdc.com with ESMTP; 01 Jul 2019 14:58:10 -0700 From: Chaitanya Kulkarni To: linux-mm@kvack.org, linux-block@vger.kernel.org Cc: bvanassche@acm.org, axboe@kernel.dk, Chaitanya Kulkarni Subject: [PATCH 5/5] Documentation/laptop: add block_dump documentation Date: Mon, 1 Jul 2019 14:57:26 -0700 Message-Id: <20190701215726.27601-6-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190701215726.27601-1-chaitanya.kulkarni@wdc.com> References: <20190701215726.27601-1-chaitanya.kulkarni@wdc.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch updates the block_dump documentation with respect to the changes from the earlier patch for submit_bio(). Also we adjust rest of the lines to fit with standaed format. Signed-off-by: Chaitanya Kulkarni --- Documentation/laptops/laptop-mode.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Documentation/laptops/laptop-mode.txt b/Documentation/laptops/laptop-mode.txt index 1c707fc9b141..d4d72ed677c4 100644 --- a/Documentation/laptops/laptop-mode.txt +++ b/Documentation/laptops/laptop-mode.txt @@ -101,14 +101,14 @@ a cache miss. The disk can then be spun down in the periods of inactivity. If you want to find out which process caused the disk to spin up, you can gather information by setting the flag /proc/sys/vm/block_dump. When this flag -is set, Linux reports all disk read and write operations that take place, and -all block dirtyings done to files. This makes it possible to debug why a disk -needs to spin up, and to increase battery life even more. The output of -block_dump is written to the kernel output, and it can be retrieved using -"dmesg". When you use block_dump and your kernel logging level also includes -kernel debugging messages, you probably want to turn off klogd, otherwise -the output of block_dump will be logged, causing disk activity that is not -normally there. +is set, Linux reports all disk I/O operations along with read and write +operations that take place, and all block dirtyings done to files. This makes +it possible to debug why a disk needs to spin up, and to increase battery life +even more. The output of block_dump is written to the kernel output, and it can +be retrieved using "dmesg". When you use block_dump and your kernel logging +level also includes kernel debugging messages, you probably want to turn off +klogd, otherwise the output of block_dump will be logged, causing disk activity +that is not normally there. Configuration