Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp534701pxf; Wed, 24 Mar 2021 09:54:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIDuJsDI6dI/URvLA88K0f460J7KWlWOlHwwJ70bi1E5QRfrqEAn31q11A7ZcevgMiX5Q2 X-Received: by 2002:a17:906:8593:: with SMTP id v19mr4767135ejx.32.1616604870771; Wed, 24 Mar 2021 09:54:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616604870; cv=none; d=google.com; s=arc-20160816; b=Iq43NC5hEMC2C8iquP5W88c/GzumnzundDMViM0/aPVV8QHxY+o5d8qHg5ixaIOjSJ 0RI6PgzYBDW4fvPX+IhRyDTeCl4w05z5NDSLOEYS2h+mD9A8laX9T+RBvO62/grnKE1G 7UhVnSjyt66lgTLsAZCL5CtACzpLHobWhMrTMXaoMEu9oqjh6RVhKZ57vLmCPkK0WgAS HloWGM8DS+R6eqitj0rcEYGqli9fB1qgxhPJCmeJVEVfYhqfE+Qf/gZdTUHXd7L+he1A 1nZI9aBwPLzPrL953JBYFIjmgvjl65yvgH5vqxm5k8NHrbv2GOS+5Jy/vFwqEIYtnLj7 rbXg== 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=p896MMjCXKF7WbFHC1Pv0dLoztsugQ2zM49PvrwbtpU=; b=DAa/zjwbfupKGlHNhsiuqG4xvweqgmL83c5p7eKOPf5NXWYuPPp9v+iL2mAmIj4+kR WR9WOzoTGpbxSlsZhR+0m/gL9cLQaHzmFWC3wCU6mEnJDtiiLlvpoKMPVzelxjaV1j0c qqf6+4hJtyRaMLA98HfduAes6U8T2KkkXidM8ZHGpp6z4aydxto1eoQOSiDAOepB1gvf 6BW1DRcrl84GJjyLErvDmR06l+otUn8CQAdCI7y//1+yQz1DLQU4FI6YoPcdz7uaZhDq KI0mXMn+pvnnDtb7Q1fjxX02HDTh5o7YhmCgHZyMCD81Ntq0o5coLloTg24UyFJiY3hM J4Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=RS92b6Yx; 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 du1si1789416ejc.12.2021.03.24.09.54.05; Wed, 24 Mar 2021 09:54:30 -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=RS92b6Yx; 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 S236580AbhCXQus (ORCPT + 99 others); Wed, 24 Mar 2021 12:50:48 -0400 Received: from mx2.suse.de ([195.135.220.15]:41030 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236600AbhCXQu1 (ORCPT ); Wed, 24 Mar 2021 12:50:27 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1616604625; 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=p896MMjCXKF7WbFHC1Pv0dLoztsugQ2zM49PvrwbtpU=; b=RS92b6YxaBBHvVYi8Xl7jczc15olHnDz/6vFsgQT0RCaEilJPP5oWB3ptbhLRvXYb+o/53 UBvnQak+Z1+eIOxGB5+pWPxQx7CFKpaEJDx30YfAKbJWEfSDN7ZA5vpU8MkLe/CY/9deMd w9RXrwfDujAqQq7PDRXGVzbg+ZqxNMo= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id AFFF6AC1D; Wed, 24 Mar 2021 16:50:25 +0000 (UTC) Date: Wed, 24 Mar 2021 17:50:24 +0100 From: Michal Hocko To: Mike Kravetz Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Shakeel Butt , Oscar Salvador , David Hildenbrand , Muchun Song , David Rientjes , Miaohe Lin , Peter Zijlstra , Matthew Wilcox , HORIGUCHI NAOYA , "Aneesh Kumar K . V" , Waiman Long , Peter Xu , Mina Almasry , Andrew Morton Subject: Re: [RFC PATCH 5/8] hugetlb: change free_pool_huge_page to remove_pool_huge_page Message-ID: References: <20210319224209.150047-1-mike.kravetz@oracle.com> <20210319224209.150047-6-mike.kravetz@oracle.com> <43595c4b-7f3f-f812-b4fe-66c900718e85@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43595c4b-7f3f-f812-b4fe-66c900718e85@oracle.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 24-03-21 09:38:17, Mike Kravetz wrote: > On 3/24/21 1:40 AM, Michal Hocko wrote: > > On Tue 23-03-21 18:03:07, Mike Kravetz wrote: > > [...] > >> Since you brought up cgroups ... what is your opinion on lock hold time > >> in hugetlb_cgroup_css_offline? We could potentially be calling > >> hugetlb_cgroup_move_parent for every hugetlb page while holding the lock > >> with interrupts disabled. > > > > I am not familiar with hugetlb cgroup code TBH. But from a quick look > > there is not much of heavy lifting there. If we find out that this is > > really visible we can do the lock dance with cond_resched and retry with > > the iteration again. Or is there any strong reason to process the list > > in a single go? > > AFAICT, the primary reason for processing the list in a single go is > that the lock protects the list. If you drop the lock, the list can > change ... > > I have come up with a (not so pretty) way of processing the list in > batches of pages. But, I dod not want to introduce that if there is no > need. Perhaps just take a wait and see approach for now. > > I'll see if I can come up with some timing information to determine > if/when we may have an issue. I wouldn't bother at this stage. This can be done on top. -- Michal Hocko SUSE Labs