Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp587210pxb; Mon, 25 Oct 2021 14:23:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyG8V2KtNWBQAShLXlXB+T/VeYBUwKvkYaThKj+uUDO554RnP6qnlMOKubEhwJjdqjpt1XR X-Received: by 2002:a63:3649:: with SMTP id d70mr9283162pga.37.1635197005300; Mon, 25 Oct 2021 14:23:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635197005; cv=none; d=google.com; s=arc-20160816; b=UBFte8I8l4Qxy/+dXuZoXVhVujpmD0HVdyw6YZSgtiFTFO+TqKdbVQ9wjCthvkW92X UwST0h5FBDDd9bbeqmkGomPq02kzCaX2fo19pfindRx0BHMiN2ZNkHSiZ/Ssrshd+A28 lufq6ZMD3+vdl8zrI2JTMQERHEtzUlCgybn0PBYekLUT3e7Pdyl5+s2l5njSWU8CBEw+ EkhF51HGGjLLvyRMIdgtyRDr9OsoskFysCo1NllhN6HPzvHHzYwv/mGfLiH+5ypZwkm5 DA3M1wJagyXVTLxinuV9HvWxhOSlEsf9isr5bP4iHEDShSxYWEUiKcw1J1zO60Xt/9w2 JHng== 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=OtqiJHq8zuWsjUAFlcfMCqR4fr77OchepUlZR3e94fI=; b=MPYsgm2w0/Bxn7Pz+QZ249mPk+JBsiBZAB12cNgX279nGDS5gQ8pYaoO9MYjIDYL0h 6EgGBNFX/wAmuq75G5SWdQatYpzyaBh9QF/q45azIxNyyTmLw1H13gp1Ejs0IGbLgb8V PxKmYnxZGt4vWirMd/PtVdJvb4TRagUiYKhHh6qIuTbkPUaT81xi3UaeEyio2w92paRq ylH6QS8F/nCNlsvZtvUbfVKSmZzJ9F/FKo+2sTzBkKsTCzZcddg77MkTjWf/teoZNT8J A96D8sS8rNmcd1fpmvknQx96vDO6qZzHje9xmT9CRmGMz8/AtNZTnJU78AuHiHrfhLbu cUqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=FN3DSXPz; 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 a12si3282744plh.42.2021.10.25.14.23.11; Mon, 25 Oct 2021 14:23:25 -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=FN3DSXPz; 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 S233602AbhJYO6y (ORCPT + 99 others); Mon, 25 Oct 2021 10:58:54 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:52886 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230268AbhJYO6y (ORCPT ); Mon, 25 Oct 2021 10:58:54 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id D4790218B0; Mon, 25 Oct 2021 14:56:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1635173790; 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=OtqiJHq8zuWsjUAFlcfMCqR4fr77OchepUlZR3e94fI=; b=FN3DSXPzbzFZ1eiR+q19iiK1WqL+9W76nWnCKbE6Hvy3HDswx3rxfnRvM0rUOvzxxXhjxy /V8l8UsXuSr9ov5xT+zTwWT5SZ8a8OMyixDCTP3+pATodSk7lVG+2IvA6xTqAu1+iSeCht G9t9RANQ3TdzT0GPUkBZ7Vepwqq6H0o= 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 A2EB1A3B8A; Mon, 25 Oct 2021 14:56:30 +0000 (UTC) Date: Mon, 25 Oct 2021 16:56:28 +0200 From: Michal Hocko To: Uladzislau Rezki Cc: NeilBrown , 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: <20211020192430.GA1861@pc638.lan> <163481121586.17149.4002493290882319236@noble.neil.brown.name> <20211021104038.GA1932@pc638.lan> <163485654850.17149.3604437537345538737@noble.neil.brown.name> <20211025094841.GA1945@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 Mon 25-10-21 16:30:23, Uladzislau Rezki wrote: > > > > I would really prefer if this was not the main point of arguing here. > > Unless you feel strongly about msleep I would go with schedule_timeout > > here because this is a more widely used interface in the mm code and > > also because I feel like that relying on the rounding behavior is just > > subtle. Here is what I have staged now. > > > I have a preference but do not have a strong opinion here. You can go > either way you want. > > > > > Are there any other concerns you see with this or other patches in the > > series? > > > it is better if you could send a new vX version because it is hard to > combine every "folded" Yeah, I plan to soon. I just wanted to sort out most things before spaming with a new version. > into one solid commit. One comment below: > > > --- > > commit c1a7e40e6b56fed5b9e716de7055b77ea29d89d0 > > Author: Michal Hocko > > Date: Wed Oct 20 10:12:45 2021 +0200 > > > > fold me "mm/vmalloc: add support for __GFP_NOFAIL" > > > > Add a short sleep before retrying. 1 jiffy is a completely random > > timeout. Ideally the retry would wait for an explicit event - e.g. > > a change to the vmalloc space change if the failure was caused by > > the space fragmentation or depletion. But there are multiple different > > reasons to retry and this could become much more complex. Keep the retry > > simple for now and just sleep to prevent from hogging CPUs. > > > > diff --git a/mm/vmalloc.c b/mm/vmalloc.c > > index 0fb5413d9239..a866db0c9c31 100644 > > --- a/mm/vmalloc.c > > +++ b/mm/vmalloc.c > > @@ -2944,6 +2944,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, > > do { > > ret = vmap_pages_range(addr, addr + size, prot, area->pages, > > page_shift); > > + schedule_timeout_uninterruptible(1); > > > We do not want to schedule_timeout_uninterruptible(1); every time. > Only when an error is detected. Because I was obviously in a brainless mode when doing that one. Thanks for pointing this out! -- Michal Hocko SUSE Labs