Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758956AbcJRLmT (ORCPT ); Tue, 18 Oct 2016 07:42:19 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:33935 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753558AbcJRLmL (ORCPT ); Tue, 18 Oct 2016 07:42:11 -0400 Date: Tue, 18 Oct 2016 13:42:08 +0200 From: Michal Hocko To: zhouxianrong Cc: Mel Gorman , linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, viro@zeniv.linux.org.uk, mingo@redhat.com, peterz@infradead.org, hannes@cmpxchg.org, vbabka@suse.cz, vdavydov.dev@gmail.com, minchan@kernel.org, riel@redhat.com, zhouxiyu@huawei.com, zhangshiming5@huawei.com, won.ho.park@huawei.com, tuxiaobing@huawei.com Subject: Re: [PATCH] bdi flusher should not be throttled here when it fall into buddy slow path Message-ID: <20161018114207.GD12092@dhcp22.suse.cz> References: <1476774765-21130-1-git-send-email-zhouxianrong@huawei.com> <20161018095912.GD22174@techsingularity.net> <1f606d0e-791b-31ea-94b2-2c9713b7c176@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1f606d0e-791b-31ea-94b2-2c9713b7c176@huawei.com> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2776 Lines: 56 On Tue 18-10-16 19:08:05, zhouxianrong wrote: > Call trace: > [] __switch_to+0x80/0x98 > [] __schedule+0x314/0x854 > [] schedule+0x48/0xa4 > [] schedule_timeout+0x158/0x2c8 > [] io_schedule_timeout+0xbc/0x14c > [] wait_iff_congested+0x1d4/0x1ec > [] shrink_inactive_list+0x530/0x760 > [] shrink_lruvec+0x534/0x76c > [] shrink_zone+0x88/0x1b8 > [] do_try_to_free_pages+0x240/0x478 > [] try_to_free_pages+0x10c/0x284 > [] __alloc_pages_nodemask+0x540/0x918 > [] new_slab+0x334/0x4a0 > [] __slab_alloc.isra.75.constprop.77+0x6bc/0x780 > [] kmem_cache_alloc+0x144/0x23c > [] mempool_alloc_slab+0x2c/0x38 > [] mempool_alloc+0x7c/0x188 > [] bio_alloc_bioset+0x1cc/0x254 > [] _submit_bh+0x74/0x1c8 > [] __block_write_full_page.constprop.33+0x1a0/0x40c > [] block_write_full_page+0xe0/0x134 > [] blkdev_writepage+0x30/0x3c > [] __writepage+0x34/0x74 > [] write_cache_pages+0x1e8/0x450 > [] generic_writepages+0x54/0x8c > [] do_writepages+0x40/0x6c > [] __writeback_single_inode+0x60/0x51c > [] writeback_sb_inodes+0x2d4/0x46c > [] __writeback_inodes_wb+0xa4/0xe8 > [] wb_writeback+0x314/0x3fc > [] bdi_writeback_workfn+0x130/0x4e0 > [] process_one_work+0x18c/0x51c > [] worker_thread+0x15c/0x51c > [] kthread+0x10c/0x120 > > the above calltrace occured when write sdcard under large and long pressure. > the patch is a performance issue. i hope flusher do not be throttled just here and > let it reclaim the successive clean file pages or anonymous pages on lru list > and then return to write left dirty pages of inode. it would speed up write-back > speed of dirty pages. so other direct reclaimers can reclaim more clean pages. > in low memory caused by big pagecache bdi writeback speed play a key role. If we got here then we are hitting into dirty/writeback pages on the tail of the LRU list and the bdi is congested. So there are no clean pages most probably and the storage doesn't catch up with that IO. Why do you think that not throttling would help here? Do you really see that the further reclaim really makes forward progress or it just wastes more CPU without doing a useful work? In other words much more information please! -- Michal Hocko SUSE Labs