Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp279970pxf; Thu, 11 Mar 2021 03:51:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJykQ3ZiYX6UVsnmPOJ7OEPRtG8e5r4FYCPheTmXBZ0O8/RO9xaa3rrVe/+k12pVFDptaz+M X-Received: by 2002:a17:906:73cd:: with SMTP id n13mr2602913ejl.535.1615463480900; Thu, 11 Mar 2021 03:51:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615463480; cv=none; d=google.com; s=arc-20160816; b=i+ekadHT5UMcphJBKXpTivWnnqaKhYlENfaN8UZH+lxXBg66yZy1alvTJr5T6KADX1 ZjskbFPqQaRKJ9eq3Um5f1rOhC39SYt7RTlOr7js5OIHjJjwIGtXOYLHf20TB86JsSbM dbqF9ZmQAdK59oGDiQDQjNz+8YdthxbGNS//tuN8hjDUBhxXIs0J3DaUoGFDygXaFjwe 5YcY9cxvQ1EcPFLz8YtKVqTYnoSwhfCl3lu33SUeL9NEGUbEbrHQAlPtc0oq0tUItiIX jJeRnmi1/JrzgknZVwOUaZXY0DRdFnJ2wOz7BPYUtY9iuVZsbBcJqMJkIG473RlZiesw CL8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=EH7MDDX3ob4TQtoFvMWi+0W+D+sHPRtcD/E5z1YEHGk=; b=ss9O5jueKb+WibCUKO5qYbJ38+fG7hysGNN8/DEM255l2zxvUoit7r5gd/AxWjxlUP TfcuDe+KmY5INvzxaivtJwxs4KI08BSgWtPavDUQqz+g5TCwrM5dUBPDO2etXbGJ5R45 HAdjA0OtkQu7N2rdpVHtycEphji1WSdU8PTdyc4t8VQ1g5gT8CMsPXvT9+HjUCbPQnar dzEl166WMvcJZqEpuy+KxOTrliJaspSxlOLIlAIPOZ353JMJcr7zLwZgCy1gGptiXXkh +/QRE8DivLPI0w1Kw/4/TgrCIktrLdoCNxQdVtRkyHmD4O8uNjJMfKGxv/ZEEftYbVSg ANWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n14si1580122eja.11.2021.03.11.03.50.57; Thu, 11 Mar 2021 03:51:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232681AbhCKLuA (ORCPT + 99 others); Thu, 11 Mar 2021 06:50:00 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:13146 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232519AbhCKLti (ORCPT ); Thu, 11 Mar 2021 06:49:38 -0500 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Dx6cg50HWzmVyX; Thu, 11 Mar 2021 19:47:15 +0800 (CST) Received: from [10.136.110.154] (10.136.110.154) by smtp.huawei.com (10.3.19.202) with Microsoft SMTP Server (TLS) id 14.3.498.0; Thu, 11 Mar 2021 19:49:30 +0800 Subject: Re: [PATCH v2] f2fs: allow to change discard policy based on cached discard cmds To: Sahitya Tummala , Jaegeuk Kim , CC: References: <1615453148-30443-1-git-send-email-stummala@codeaurora.org> From: Chao Yu Message-ID: <7d31f95b-d99f-b56a-8129-f65910f14cdf@huawei.com> Date: Thu, 11 Mar 2021 19:49:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1615453148-30443-1-git-send-email-stummala@codeaurora.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.136.110.154] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/3/11 16:59, Sahitya Tummala wrote: > With the default DPOLICY_BG discard thread is ioaware, which prevents > the discard thread from issuing the discard commands. On low RAM setups, > it is observed that these discard commands in the cache are consuming > high memory. This patch aims to relax the memory pressure on the system > due to f2fs pending discard cmds by changing the policy to DPOLICY_FORCE > based on the nm_i->ram_thresh configured. > > Signed-off-by: Sahitya Tummala > --- > v2: > - by mistake the last else condition was modified, fix it now. Oh, yes, Reviewed-by: Chao Yu Thanks,