Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1565999pxb; Wed, 20 Oct 2021 07:35:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytKl5m2Z4NrRQOFooMM0hb95FKmX54u1LYxZR8Q5Hv1FodIWcW5lz7+FxRJSZ4pSpcHkLz X-Received: by 2002:a17:90a:a24:: with SMTP id o33mr7826871pjo.229.1634740515340; Wed, 20 Oct 2021 07:35:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634740515; cv=none; d=google.com; s=arc-20160816; b=UtFE4GH7Fkb76TctLylRXllAvzIrst0eQ6d//3UNPapZDuq3K1TeYNJo6XdyDjUFph UxcJrJPzwFq7QdQAi6MM5BZqdYFnGImXXzjV2imh5HDetkA7HgfyncyGtgiFcqzxZXYE q00wRLVyFuuXAQ2zVFdIOv4zSvNfDR/I7k/Ng6dHesifiFZRjDLvODY2b9eJoMpD8l8P KA0glM7hSsDinOd2+nfbigoKcJ/6qUMk7ZbYNVGbVbPzj7Ywb8mHCAzaIDTqU+l43g7S ntDPl8Q1n1FMN7VicRp3QZ9k6hRpIxROUsgYpyWZ259NnsjHo1lPTT7niKa44fq5bJaa hbAQ== 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=iFAwf1Gu+ZBiSW1CPvj4L0uWy2D/0RqhKLQHFsLSUs8=; b=dCEc9qsSsESUupslUyfqu/tA2R7HG45iimg5jNXggDmhLME5KbgU2sVz5SGkTh9g9U HuAbdkyYPQmF5xESl9ybK1pKB0TEnxfatcxMYMKNDy62rOcJe63po5V37X0Whmz14FPh DmSuj8p59BMpLwwjpn6FWPjAewEk0EYI8Hsvo3CLtf3qXEcjNFQ8xoyV3f5zyG6qLhIP mY6ogd10m+80rIoIJ9D5AS8dSRHl3XEUJgyHLDH1/5hgh+WtZu91lrpV09cfmNp7ixkx ynYhligfJVlVU8/sdqF5p8ldV9u8B3JfpEIiSphnBq/eZKVCayEwGbLdotTfT9c9Z0xi 5lNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="EWotqfG/"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c10si3135842plc.144.2021.10.20.07.34.50; Wed, 20 Oct 2021 07:35:15 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20210112 header.b="EWotqfG/"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230179AbhJTOd5 (ORCPT + 99 others); Wed, 20 Oct 2021 10:33:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229632AbhJTOd4 (ORCPT ); Wed, 20 Oct 2021 10:33:56 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B679C06161C; Wed, 20 Oct 2021 07:31:42 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id z20so26992524edc.13; Wed, 20 Oct 2021 07:31:42 -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=iFAwf1Gu+ZBiSW1CPvj4L0uWy2D/0RqhKLQHFsLSUs8=; b=EWotqfG/a7IlHyHxzfO3IlJLzDf3b0K6lOYL+cxy84J+m/sr9lXC2gmL8ASPIphDhB a0FxJKhe1yt/qWjukMgg1kyE2MOoH3jPt+G2uKtlYo5RAYK1Ut/RT0rU4XUreflUQd+Q HC5PCXHYr8QgSZyT19rQyw53al0QucB3wxp70xgOTgI7ULOKA0YlP41uSdGWOuHqRsHL 1VIB2mxBqdmHUVZQQrI4Ko5QyPb9IMHpqoitpJkHVYF56naYmfbBhDWezJ5vOWrhyVct EMrqO7WFk3utTJ67IEn7PT7ku00ZbEkYOKQNtlDFrEqzZg5rtJ0x/qvqESmAu8ZwKFv3 m3TA== 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=iFAwf1Gu+ZBiSW1CPvj4L0uWy2D/0RqhKLQHFsLSUs8=; b=YKYMPIbBqj3TLJsFTpwmtaMQVxxn72IRdCDdecoGNnpXu2KOgyv5yd4rSQB03oG0g6 TWbqz/2dPPp92dbFEnZIdvxyI2Ebr90H/D3bljDrVf3LJ09z8DCmZuuhTxnJj6bS+wa7 vayUxjmuBPcI6Sm5qbkJOtWfOzjsqoaLPaWF3/UM5a4ZZkhAUxf2dNtHC5D7V3XagTAR zDFoKZygdAjAEMFE/mqnbgoH+/SCMhpMsFwPk8YvqnEAhmvdpzUuH9Ykn/OSJPzABi7c NkpFpkb2juiD8URgvGiWNDnFKpUh4siJdbHnX1B1gNe3Ra84qbjLQAMiq+iHLcZgne48 0abQ== X-Gm-Message-State: AOAM531hbZkjGa9vw26sJkjd1VBeAQkEWogDM+VvE7RveTHvTn/TDKAW UIPZtKOrgtG/EiiRRkvUd2ySaY2+MEWdk3NQ/MxeboTcWIryAQ== X-Received: by 2002:a05:6402:22d6:: with SMTP id dm22mr367043edb.209.1634740165899; Wed, 20 Oct 2021 07:29:25 -0700 (PDT) MIME-Version: 1.0 References: <20211018114712.9802-1-mhocko@kernel.org> <20211018114712.9802-3-mhocko@kernel.org> <20211019110649.GA1933@pc638.lan> <20211019194658.GA1787@pc638.lan> In-Reply-To: From: Uladzislau Rezki Date: Wed, 20 Oct 2021 16:29:14 +0200 Message-ID: Subject: Re: [RFC 2/3] mm/vmalloc: add support for __GFP_NOFAIL To: Michal Hocko Cc: Linux Memory Management List , Dave Chinner , Neil Brown , Andrew Morton , Christoph Hellwig , linux-fsdevel@vger.kernel.org, LKML , Ilya Dryomov , Jeff Layton Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 20, 2021 at 4:06 PM Michal Hocko wrote: > > On Wed 20-10-21 15:54:23, Uladzislau Rezki wrote: > > > > > > > > > I think adding kind of schedule() will not make things worse and in corner > > > > cases could prevent a power drain by CPU. It is important for mobile devices. > > > > > > I suspect you mean schedule_timeout here? Or cond_resched? I went with a > > > later for now, I do not have a good idea for how to long to sleep here. > > > I am more than happy to change to to a sleep though. > > > > > cond_resched() reschedules only if TIF_NEED_RESCHED is raised what is not good > > here. Because in our case we know that we definitely would like to > > take a breath. Therefore > > invoking the schedule() is more suitable here. It will give a CPU time > > to another waiting > > process(if exists) in any case putting the "current" one to the tail. > > Yes, but there is no explicit event to wait for currently. > > > As for adding a delay. I am not sure about for how long to delay or i > > would say i do not > > see a good explanation why for example we delay for 10 milliseconds or so. > > As I've said I am OK with either of the two. Do you or anybody have any > preference? Without any explicit event to wake up for neither of the two > is more than just an optimistic retry. > From power perspective it is better to have a delay, so i tend to say that delay is better. -- Uladzislau Rezki