Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1540346pxb; Wed, 20 Oct 2021 07:07:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/mwGWdCW/dZZkxg0gsU/N02IKTHJiqwUSfokRyPSZTqnMQQn3QouVCMPzioKFwlItnY2h X-Received: by 2002:a17:90a:bd08:: with SMTP id y8mr112064pjr.123.1634738870234; Wed, 20 Oct 2021 07:07:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634738870; cv=none; d=google.com; s=arc-20160816; b=yF2pZFZNI4KYVOudaUYqgWstinzAI05U5hyjCu1dXv+G3LTzyEjgnuN2pk1AKZLz6v 0vr/0dS25wr5U14HrtblFubxvCbsnD9u/n7SyoqlRhCDwKwl2kUTn3FPMpxQ5EgPkICf lKhHRkR6cr28jbhhEVxd07hKLxVRATkiZtbvtGI0fFjrpCEnkK/ySC+vlM9VzrqqS2eg sktqzvcHtHrCnFr8cGyO1SyQb/LK0BmkQWjXP9ccGCge1P0lTMg2M+SbS0yjnEolbMDT 8f6WPzpX9hNAP0y4+wHEYP0ADeMo6nJVDkUvnSJCv+a/h51rMHG9gVaOWfQPRIEfklpx tHSg== 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=8LBh2cfuvkiBjRN5KYfkv+nWpJ1+urNfv8ByT8ZENOk=; b=0msn97wYlleJQdqJtOFmymfCJ86iSc3dMZYEDkOE8dETs7oukseN1oj71MG/jLdUT7 SsPHk5G3qO+i+7nkOUO91vUABMGNF20xwdxBSfNi/zDMY8q6koIL8iZSgziD41+hrT7X oN/r/KhKMGl6TMFBxLwuarJzmY6SpyPGWSPFRvW5fZknE8zSaKFPmqoktgGiz02GQ3DH iyGxNYkTCWL6MlYkUiWkr+SHkW7ufcLpjTvxH/0EQ3HHfIRpQ9Rb63WMRVppkPsj6zPl CB95gfJjDO7Dja36AHxoaaEqFtIhqWWMD+uR3n+fSGZq8FR/3pNjHXzVGuWJ4awn8dwg df5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=etRnN9aZ; 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 y8si3072822pgh.387.2021.10.20.07.07.32; Wed, 20 Oct 2021 07:07:50 -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=etRnN9aZ; 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 S230265AbhJTOIr (ORCPT + 99 others); Wed, 20 Oct 2021 10:08:47 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:48846 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230082AbhJTOIq (ORCPT ); Wed, 20 Oct 2021 10:08:46 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id C58131FD39; Wed, 20 Oct 2021 14:06:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1634738790; 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=8LBh2cfuvkiBjRN5KYfkv+nWpJ1+urNfv8ByT8ZENOk=; b=etRnN9aZU6UoO1QQkQcCtZVMEXIxpjIWVQA8cmBYgMbRQJyZdi4aHS8P2LG/DsbRbpdl50 fF9jrEFYAiFzj2Z6bHrjRObK3nl7B4SxT2M/G/iYCgFIkEAfVMnbitLuT5oa3FijPawRy5 NY1bYjW/xrTYQQ4m2obifWqR8g7irzE= 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 71486A3BA1; Wed, 20 Oct 2021 14:06:30 +0000 (UTC) Date: Wed, 20 Oct 2021 16:06:29 +0200 From: Michal Hocko To: Uladzislau Rezki Cc: Linux Memory Management List , Dave Chinner , Neil Brown , 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: <20211018114712.9802-1-mhocko@kernel.org> <20211018114712.9802-3-mhocko@kernel.org> <20211019110649.GA1933@pc638.lan> <20211019194658.GA1787@pc638.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- Michal Hocko SUSE Labs