Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758277AbcJRJfV (ORCPT ); Tue, 18 Oct 2016 05:35:21 -0400 Received: from out0-156.mail.aliyun.com ([140.205.0.156]:37239 "EHLO out0-156.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752594AbcJRJfM (ORCPT ); Tue, 18 Oct 2016 05:35:12 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R211e4;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e02c03300;MF=hillf.zj@alibaba-inc.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---.73yrfkc_1476783281; Reply-To: "Hillf Danton" From: "Hillf Danton" To: , Cc: , , , , , , , , , , , , , , , References: <1476774765-21130-1-git-send-email-zhouxianrong@huawei.com> In-Reply-To: <1476774765-21130-1-git-send-email-zhouxianrong@huawei.com> Subject: Re: [PATCH] bdi flusher should not be throttled here when it fall into buddy slow path Date: Tue, 18 Oct 2016 17:34:41 +0800 Message-ID: <022d01d22922$dad86f90$90894eb0$@alibaba-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQKLDCO7Rl15/MMe2wlDvuzIXii4oJ88KpfQ Content-Language: zh-cn Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 736 Lines: 23 > @@ -1908,7 +1908,7 @@ void wb_workfn(struct work_struct *work) > long pages_written; > > set_worker_desc("flush-%s", dev_name(wb->bdi->dev)); > - current->flags |= PF_SWAPWRITE; If flags carries PF_LESS_THROTTLE before modified, then you have to restore it. > + current->flags |= (PF_SWAPWRITE | PF_BDI_FLUSHER | PF_LESS_THROTTLE); > > if (likely(!current_is_workqueue_rescuer() || > !test_bit(WB_registered, &wb->state))) { > @@ -1938,7 +1938,7 @@ void wb_workfn(struct work_struct *work) > else if (wb_has_dirty_io(wb) && dirty_writeback_interval) > wb_wakeup_delayed(wb); > > - current->flags &= ~PF_SWAPWRITE; > + current->flags &= ~(PF_SWAPWRITE | PF_BDI_FLUSHER | PF_LESS_THROTTLE); > } > thanks Hillf