Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp337818rwl; Wed, 5 Apr 2023 01:04:31 -0700 (PDT) X-Google-Smtp-Source: AKy350ac9UXX+J5HuQUQUV+XGVpL1511b9lhdARO0dR6yRrDv2ncdakyas90eX3cV3A+tEGXwkJB X-Received: by 2002:a17:902:ecca:b0:19e:f315:98d with SMTP id a10-20020a170902ecca00b0019ef315098dmr5508649plh.43.1680681871564; Wed, 05 Apr 2023 01:04:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680681871; cv=none; d=google.com; s=arc-20160816; b=b9xUOmrAdqEhcdrRNUNr066y3pyvIKc9fHAwTjF+lDWG1C2q/AB6/pAMAkUmSlekhM GrP1uYWPQ6t2bbmsTeS6ZXtvyVe5Kfkd8nG2S1ldPal2ICZLR4G361GOZfYOvAIwPxCG +RPUjDsji4iJlJgyGkBnmwVUeTZudJwLmxUAs4RedDRIIT/qaHFY3bmF62opE8ZO2HWn QCC9wLyICPA7t2kIkDajyGLdYrY4MbyrrwOOBEVB455jwmO2yMse3+VY/stzJbr16wbO 4blSg3AbiHB+gsllgT5MJDIBSUgaA0v8zlwURUmPIh4geZ5I5v5rpJjDmoXYcNxUhDpG 7JXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=pEwjzYcWs+Nq2B13OiqxRc4o61ZYX+Tx79hgu5r8M58=; b=TGhvsWizReOvlSq3SnVoJjSGZVyPbol3ZQVQqjKx+tQq5D2ldD+JDi+fEGX2HlJAUU 1lZU3f9ZJwZN3PmUcYC1f55+1MNoBpKFMRoo4gOKnU/r4k3fNw6jnLla9MMUwKDjt0J3 yiqJbQNeoPrvphS/rbVkj1KuRvB8T11bjzt12niiEHIu8vWzXRgTeW4SlnuLGnK1jpVs svCJYElJaRBBFHUPCQxZI+kov3CZLaNZbEAQBsdF8KC03qQnnjzdi4y2CWAhRp3gTVCF SuCywXfcE0iibi/xob/HZa6hdUAPm7Ef7QP/4j3wQ4Qg2AT9DW3uzljhvFyFddpSeInP qMbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=RPHLXw9s; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kk14-20020a170903070e00b0019f39d634basi11397033plb.262.2023.04.05.01.04.05; Wed, 05 Apr 2023 01:04:31 -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=@google.com header.s=20210112 header.b=RPHLXw9s; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237313AbjDEIDF (ORCPT + 99 others); Wed, 5 Apr 2023 04:03:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237238AbjDEIDE (ORCPT ); Wed, 5 Apr 2023 04:03:04 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0069C4EFF for ; Wed, 5 Apr 2023 01:02:42 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id w9so138997933edc.3 for ; Wed, 05 Apr 2023 01:02:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1680681758; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=pEwjzYcWs+Nq2B13OiqxRc4o61ZYX+Tx79hgu5r8M58=; b=RPHLXw9sSgwpHJr/+l3qfC5nPoEvslH4Vlvp7ZohRVeJUYUwEgpmuvPKwY6/LAXZ4c UOr2vNt2IlvzNfCaVQTdzSrG/5hklqwq4qvvOX5tzuKA2xdV4XLARc3NBhi1qSAOQjD1 cAmoZtTp54aqHRdSbkkOPSuSe2DuJuiQ60d3rrjhRuEDjbeDCiCtdJofsgfVpbUXlEjX CQZYdJCMd59NPSp5JXIV8SyRsgFDebBJEr+pQBUnYDWZ3fuQ/FuyH+8DnTaPmUf7AJD/ oDSYlI8G38WcKprwnEqQcqTjojvsHbIsQB/2aZR84YGGUdCVPwVqmG5BIFmMQrVLugm6 fcSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680681758; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pEwjzYcWs+Nq2B13OiqxRc4o61ZYX+Tx79hgu5r8M58=; b=rrq5IZ/P7+ei2Wtcs8dorBFDfJs828/HH3pHRMfHXSgceT3/ggMxlTX7VezS7sHCHJ y6HcK5hNjOuriY5CXEadGJmfeZBq+IMclBiJHEngLv9BV7pgqpxY9mg9YrZPEHasDrCM mnI00RbvAGfTzanmdAOzfPEuzUhjPnWMXqJbujb56vvbtCk6Pqwi7GtHJE7ipOKpxnfa rtI35nm9UYCZKc+ViLRvgBhz0slTeDHgdfCHLpUlUgJ0f0of257B8GB2rPZYl5jFCcn6 6gfYkVyHEXsfH0hKdfUFLypMU5BsI/gpdig3NlS0p6V+izZgdqwYRtorNHa+E87eXHAL 09iw== X-Gm-Message-State: AAQBX9c6+iJTeL9WdRNFR/xdMFUonVdQ9qQWT8K+B7qk2MlP8OPuT0hv 26uJjLoD6CltSJSAtSnuZdfmvQlr0HEH+vNVJvTgng== X-Received: by 2002:a17:907:2075:b0:947:72cd:9325 with SMTP id qp21-20020a170907207500b0094772cd9325mr1212514ejb.15.1680681758108; Wed, 05 Apr 2023 01:02:38 -0700 (PDT) MIME-Version: 1.0 References: <20230330191801.1967435-1-yosryahmed@google.com> <20230330191801.1967435-7-yosryahmed@google.com> <20230404165305.ffs7uscqpndnfytn@blackpad> <20230405080047.5omnatjbwz46f3y5@blackpad> In-Reply-To: <20230405080047.5omnatjbwz46f3y5@blackpad> From: Yosry Ahmed Date: Wed, 5 Apr 2023 01:02:01 -0700 Message-ID: Subject: Re: [PATCH v3 6/8] workingset: memcg: sleep when flushing stats in workingset_refault() To: =?UTF-8?Q?Michal_Koutn=C3=BD?= Cc: Tejun Heo , Josef Bacik , Jens Axboe , Zefan Li , Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Andrew Morton , Vasily Averin , cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, bpf@vger.kernel.org, Michal Hocko Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-15.7 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=unavailable 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 On Wed, Apr 5, 2023 at 1:00=E2=80=AFAM Michal Koutn=C3=BD wrote: > > On Tue, Apr 04, 2023 at 11:09:02AM -0700, Yosry Ahmed wrote: > > IIUC there are multiple places where we can sleep in this path, we can > > sleep waiting for a page to be read from disk, we can sleep during > > allocating the page to read into, and IIUC the allocations on the > > fault path can even run into reclaim, going into the vmscan code. So > > there are precedents, but I am not sure if that's enough argument. > > I expect it'd depend on the proportion of the slow/fast paths. > OK, let's see how it turns out in wider population. Agreed. It also depends on the number of memcgs and how much the periodic flusher is keeping up. I think no amount of testing will cover all or even most workloads. > > Thanks, > Michal