Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp478932pxb; Thu, 21 Oct 2021 03:30:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDXwSK3iKDdj8EKkLKOHAASthcfpuMYITWkpP++1z2Boc7g1DRv8h+So+O36Bxp+SizbNP X-Received: by 2002:a50:e043:: with SMTP id g3mr6687963edl.196.1634812232866; Thu, 21 Oct 2021 03:30:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634812232; cv=none; d=google.com; s=arc-20160816; b=JtYGk7XvpYZV1nKNCr7ntz5KQH4FHZLDPK7A7+l+WdT9YtxjORO7wPv+IbTLTkl0hu uFOZLiOfLOrjRaG/D4Q65tR9S2pH7t/hIGDDokQsy506bZVk+MAT2hxD5wdju3kd6EC8 q794jTWXLkYTvzs4vLc3GCa0J7j5iC1YBoHRemOS1+T/h0m0TAiZ+Kdtq4yD4NpbxZzA YCsyapP/XIG6/bLZmfF6a9qlijmRCYFpyZNj23XIZO+04cNYGvY3KMA8zUPxNjQ7mGkP NkcYFavB2uWbnflmW603PbtgZn6HLrK7AXRx7AGWv2b71qKIcECvBDVxj9xNTWM7PUTS G3WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=l4CmcbGiUE6TXiVFsiIAM6k/VKLp51ANmkDrpUZ63zM=; b=bYl/vob6vjguFTJ9ImDHS1m/z3lPk+/rqxbefpK6nWJPOs0DkoIV4Dyyhz4/w4gZUg 6jH4cBZw431oARvSEtM8eQ+6jFPMbn+vVBiag4EL4E+XTawnwuA0fhiyFYKvKVny0MOa ea8JFGqhvmqpb6So9pa6uqbE+BC1gqyKwdU0i3nnixmNc6E0gbNawo8wD6bylVGsWhG9 uY11hFD/j9c6eIDNzvRbWkEHobvhn+bbcrY+UZlcclHJz2fJVRWgjne1e++aTpEIwp5V y4YscVRwuYRx4Goa7fte0+NhRrdqzYSg307+O8Dt5ulpA1hNnTPvkHlTrnE58CsQjQ7J q14g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Oiz0jiaU; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si7195303eje.719.2021.10.21.03.30.09; Thu, 21 Oct 2021 03:30:32 -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=@suse.com header.s=susede1 header.b=Oiz0jiaU; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230308AbhJUK3s (ORCPT + 99 others); Thu, 21 Oct 2021 06:29:48 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:60850 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230077AbhJUK3r (ORCPT ); Thu, 21 Oct 2021 06:29:47 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 6F68E1FDAC; Thu, 21 Oct 2021 10:27:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1634812050; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=l4CmcbGiUE6TXiVFsiIAM6k/VKLp51ANmkDrpUZ63zM=; b=Oiz0jiaU6hvj8nGCH0fSGOeSVxcZ3yhiH1vQ50E9ah7NBk++5F4jTXDNyIw8OjY0obZlse kmOn2cth6FQ+neI9GqDJlBE0h9K0ld/iMeT3SYYlfCewsN2ZLvBfQ+V7aE0sq/h4eEetKc qEwk9rRZPvOi2K54lSywbbjGw4QbhWY= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 3C8AEA3B85; Thu, 21 Oct 2021 10:27:30 +0000 (UTC) Date: Thu, 21 Oct 2021 12:27:28 +0200 From: Michal Hocko To: NeilBrown Cc: Uladzislau Rezki , Linux Memory Management List , Dave Chinner , Andrew Morton , Christoph Hellwig , linux-fsdevel@vger.kernel.org, LKML , Ilya Dryomov , Jeff Layton Subject: Re: [RFC 2/3] mm/vmalloc: add support for __GFP_NOFAIL Message-ID: References: <20211019194658.GA1787@pc638.lan> <20211020192430.GA1861@pc638.lan> <163481121586.17149.4002493290882319236@noble.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <163481121586.17149.4002493290882319236@noble.neil.brown.name> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 21-10-21 21:13:35, Neil Brown wrote: > On Thu, 21 Oct 2021, Uladzislau Rezki wrote: > > On Wed, Oct 20, 2021 at 05:00:28PM +0200, Uladzislau Rezki wrote: > > > > > > > > On Wed 20-10-21 16:29:14, Uladzislau Rezki wrote: > > > > > On Wed, Oct 20, 2021 at 4:06 PM Michal Hocko wrote: > > > > [...] > > > > > > 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. > > > > > > > > I am a terrible random number generator. Can you give me a number > > > > please? > > > > > > > Well, we can start from one jiffy so it is one timer tick: schedule_timeout(1) > > > > > A small nit, it is better to replace it by the simple msleep() call: msleep(jiffies_to_msecs(1)); > > I disagree. I think schedule_timeout_uninterruptible(1) is the best > wait to sleep for 1 ticl > > msleep() contains > timeout = msecs_to_jiffies(msecs) + 1; > and both jiffies_to_msecs and msecs_to_jiffies might round up too. > So you will sleep for at least twice as long as you asked for, possible > more. That was my thinking as well. Not to mention jiffies_to_msecs just to do msecs_to_jiffies right after which seems like a pointless wasting of cpu cycle. But maybe I was missing some other reasons why msleep would be superior. -- Michal Hocko SUSE Labs