Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp119653pxf; Wed, 10 Mar 2021 22:55:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJxqFU/ux9RlmYNzX715O/YZmj9AnwHx40ub2mlzNTTIRg71l/xR1sWtO2CBOKxBQFn3oUIW X-Received: by 2002:aa7:d4d6:: with SMTP id t22mr7177157edr.376.1615445756805; Wed, 10 Mar 2021 22:55:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615445756; cv=none; d=google.com; s=arc-20160816; b=sERaLyicKf11JmBLMbtg0f+kGlDhY1d3fje2D1vQG3JiqO8IhYWKuSB8LtnrefQuqa sgAuJQaED9zMoKkF9MTo0czbW8Z4LdMistoZI8O97uevNmeduxvCZAIRvTNZKBi0lTDv uk9F3br6ngrRBLXP02j/4K53aX2V3XPao61OoPP3ZHI/omoqx2L+Bkz2uwjSxfArsoxK vmbkQMlUT4eQdZd/OqUf2rTjIXU5JP2HO0Key7Sq3TeInR//kPRMoRgI9jSfMCpGynbb PeAlhvoIUc41tq6oFzFQqKyTDA0nM//ak1uXKCl0znQ2lQdFinF+sPBmwlkm7Glr8kGg OUPQ== 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=lezVq+ewH3YHqKJMD0p8nlxYx/I0HByzwbNKLXCrjL4=; b=J+GoYpGPYPiMRJ2haoggsUpuTRQHKeJW7h5XMnXMwGTmEldyEkFaBzLvzlUWVF4aEK tlnySZ2wPndLhsK37kd7r/vLRabkUVBjBWAp9ErBrEt38BKG44ImORwNrfHIsIm79tCX jxupDIDTMZzGtty7cJPYSiC1f955CocPBC6cwyhk2BjgMlLix+TuxlGQ6S1dtGxoMFsz hGba8Cz4j9Q6Bv6lVcrMqZ500HDeQnLorUJc688PYIdR4nSC4NlnGAgt9OcyYe3b9xSl tmGGH00DvYawyyP4x81KDRp89N7IkpluBoU+jygfMzlP+UcB1nWu35hQHfUJenhWK2V3 8vqg== 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 p14si1227979edq.556.2021.03.10.22.55.34; Wed, 10 Mar 2021 22:55:56 -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 S230233AbhCKGwl (ORCPT + 99 others); Thu, 11 Mar 2021 01:52:41 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:12709 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231479AbhCKGwc (ORCPT ); Thu, 11 Mar 2021 01:52:32 -0500 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Dx01t2s5tzlV8C; Thu, 11 Mar 2021 14:50:10 +0800 (CST) Received: from [10.136.110.154] (10.136.110.154) by smtp.huawei.com (10.3.19.205) with Microsoft SMTP Server (TLS) id 14.3.498.0; Thu, 11 Mar 2021 14:52:22 +0800 Subject: Re: [PATCH] f2fs: allow to change discard policy based on cached discard cmds To: Sahitya Tummala , Jaegeuk Kim , CC: References: <1615427252-7505-1-git-send-email-stummala@codeaurora.org> From: Chao Yu Message-ID: <46b466aa-9c48-f6ef-f0f1-d10085c40492@huawei.com> Date: Thu, 11 Mar 2021 14:52:21 +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: <1615427252-7505-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 9:47, 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. Agreed. > > Signed-off-by: Sahitya Tummala Reviewed-by: Chao Yu Thanks,