Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1692538iog; Tue, 14 Jun 2022 11:03:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz09TdFqEoRSgUvSLXsx1Kv7+Y2zqEjkrAis9Pxk4eblRQJIpx5kKFBOtjlx9+OybvDtwM8 X-Received: by 2002:a05:6402:2399:b0:42e:1400:818b with SMTP id j25-20020a056402239900b0042e1400818bmr7683461eda.159.1655229810899; Tue, 14 Jun 2022 11:03:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655229810; cv=none; d=google.com; s=arc-20160816; b=XPbhuAV0bwiEcG+IzDAv1tCoe0qtCv1ZcbT8cyfPfN4VrrOsBbWMu7NI3rz1ykO+dw z2vPXAKjlQBGwllleCHVIuTCV+LPvhiqoN8CGEWxvI8ZE+g/PTnn+5MwRhaqkbSexDKx W2WyS6NDx9j/SC9/jTlz5CWrmToV9XnBSoKHCws8Z1S3tJPE4LVg3xKWH6dzLJfOUxeP 2CV8dibNT8VO7oRMaN47PFHMtG+KLIDAvy6fMD7H8noZS1ZQpozzdA7dQytmWz6GXwFb XBN5/nTtsvT5vHj1sy6+27keKgMlNfvOQqIo9L9TPELzOBZMm/ZKIRhDFDuTZyJDxPzJ C1qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=9HssQcvv+z8PMOk3w7trm8lob60ctWFcsyzhbTHkSh0=; b=lkiiB/D3WEnJBAVp8LLiw7pt8gPb9y1E7VV1aqZ/IQGzvboODaC61H2QZavzCRD9sW nuSq8eEknZtkyQe/OVmCXL4axR9b/Bt42INgLf+isq0ZggdunViy+mobfjrlncdmz/sa I3/Hf+2O83n1ueAGXb5jc5SLONrM8o42D3JlZcGc4WwMF/IkWAXXTbH6AChME4L8qcCr Yf/2O7AdWLsKVLlUyIDVhsUoVBjLuEY3GNyKZee3TwfClspV6DCurxnE5Ni+gOj+X0W5 ZubWVbm9jTR8EeI1wvd39X6So/wLUEYV1Cb/yf3KanFCDCuc/2tKg53ETamO5wxCBUvY mtCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="nn/vJ8Ln"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m13-20020aa7c2cd000000b00425e3c772b9si10901252edp.333.2022.06.14.11.03.01; Tue, 14 Jun 2022 11:03:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="nn/vJ8Ln"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344959AbiFNRtz (ORCPT + 99 others); Tue, 14 Jun 2022 13:49:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345029AbiFNRtu (ORCPT ); Tue, 14 Jun 2022 13:49:50 -0400 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C19D44132F for ; Tue, 14 Jun 2022 10:49:49 -0700 (PDT) Received: by mail-yb1-xb2f.google.com with SMTP id u99so16382870ybi.11 for ; Tue, 14 Jun 2022 10:49:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9HssQcvv+z8PMOk3w7trm8lob60ctWFcsyzhbTHkSh0=; b=nn/vJ8LnxV4y5b2PuVbbt1J/VBwpoZbFlgmg33sw6MgHr50fS2e9v94ZHMC1UNjj0u YtAChRXlf1KXvkPNjhD5qeqFzNyF397fzsPmUWDCf/0kwSE3ukH3IM43fPPl9s/c8v4V XA7C4RnbnkTWRE94yaKshUFkUGxdfPzmMgCu5RIyxOfuYPjx0Q6x5gMmiFHGYEQeD5pc 54GjSM6KorNdJGP5kLwmI+a0TWdkJMuhsEQ70TNlP70ZMi3d9igKsZL53kcbr5jyNiKQ FG1pKyROK2VDZ7nn7vTocHpthJjf/Y7RM8ER/EViKQ7+tc77I/nSYW3YHKH73SLTtH1I U+xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9HssQcvv+z8PMOk3w7trm8lob60ctWFcsyzhbTHkSh0=; b=iyEVv4F9MiWrigrLzu/HeRC8e+q+ILpC8ktxqVyQN2oUlvoNoZAfMKIi0BsPCBAhJK IdDHeDk4/fJVnj8dkUtnF4KLJorciEzFQic+09bIl52cZF4gDF5K72IbhzP+JsTZ+eTh /Bj1sm0aC7LlA4gn3ONiDgVlxkO3oym5/zAwC6v+hZeV/6rAzfV0U/lafHEHEt+v5pdk 8eGPZVgFSHC7YIHW+/AQJl0+HYnCIon+EzXX5fmYnD0g1KKQzhLqMUirTE2p4TT3kXcu 0cbOLMJ/IguO+u7KOMdZDIFR7BxhLGOJ1QX5Ih9TK/eQYCXJ65ODsgJwU/ySOIhaSQfF 5peg== X-Gm-Message-State: AJIora8raBIGAXOeZOELy1FFUyckdU/PYBp7f7BXYoyd+r2qtu+0hToq /hxmxaoDUfiDkbHzTdXimJLy2Vlfij94hfI15Js= X-Received: by 2002:a25:7209:0:b0:663:f48e:83d6 with SMTP id n9-20020a257209000000b00663f48e83d6mr6158586ybc.76.1655228988939; Tue, 14 Jun 2022 10:49:48 -0700 (PDT) MIME-Version: 1.0 References: <20220613155612.402297-1-daeho43@gmail.com> In-Reply-To: From: Daeho Jeong Date: Tue, 14 Jun 2022 10:49:37 -0700 Message-ID: Subject: Re: [f2fs-dev] [PATCH] f2fs: handle decompress only post processing in softirq To: Gao Xiang Cc: Eric Biggers , Daeho Jeong , Nathan Huckleberry , kernel-team@android.com, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Yeah, I heard that you folks are really suffered from the scheduling > issues. But for my own previous experience, extra memory footprints are > really critical in Android low memory scenarios (no matter low-ended > devices or artificial workloads), it tossed me a lot. So I finally > ntroduced many inplace I/O to handle/minimize that, including inplace > I/O for compressed pages and temporary pages. > > But I'm not quite sure what's currently happening now, since we once > didn't have such non-deterministic workqueues, and I don't hear from > other landed vendors. I think it'd be better to analyse what's going > on for these kworkers from scheduling POV and why they don't schedule > in time. > > I also have an idea is much like what I'm doing now for sync > decompression, is that just before lock page and ->read_folio, we can > trigger some decompression in addition to kworker decompression, but it > needs some MM modification, as below: > > !PageUptodate(page) > > some callback to decompress in addition to kworker > > lock_page() > ->read_folio() > > If mm folks don't like it, I think RT thread is also fine after we > analysed the root cause of the kworker delay I think. > > Thanks, > Gao Xiang > > > > > Thanks, I don't think this is not a problem with most devices, since the allocated memory is not too big and it'll be kept just as long as I/O processing is on. However, I still understand what you're worried about, so I think I can make a new mount option like "memory=low", which can be used to give a hint to F2FS to have a priority on as little memory as possible. In this mode, we will try to keep minimal memory and we can use the previous implementation for decompression. Thanks,