From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF0E1C46466 for ; Mon, 5 Oct 2020 14:03:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 80B8A20B80 for ; Mon, 5 Oct 2020 14:03:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="kvuk4YYS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 80B8A20B80 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BEC2A6B006E; Mon, 5 Oct 2020 10:03:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B75856B0070; Mon, 5 Oct 2020 10:03:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A3CD56B0071; Mon, 5 Oct 2020 10:03:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0009.hostedemail.com [216.40.44.9]) by kanga.kvack.org (Postfix) with ESMTP id 7362D6B006E for ; Mon, 5 Oct 2020 10:03:35 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 05B06181AE871 for ; Mon, 5 Oct 2020 14:03:35 +0000 (UTC) X-FDA: 77338039590.24.scale11_62065fc271be Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id DA10C1A4A5 for ; Mon, 5 Oct 2020 14:03:34 +0000 (UTC) X-HE-Tag: scale11_62065fc271be X-Filterd-Recvd-Size: 2638 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Mon, 5 Oct 2020 14:03:34 +0000 (UTC) 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=1601906613; h=from:from:reply-to:subject:subject: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=xP91B5mqabvjugrhh4GTrezdAi0BDZMCQ4LhVZZrZ5Q=; b=kvuk4YYSZMOMTRBH0bfXIeAfp1Zq5BpC5PiY5FAKbgN9x8zM1nJ/jFjmL6bnuRD5l9tIDq B28SqUKVJSxi9OhWVTqNBmANuTuAXU50NvIrbcY04GUYbBpE/lz0Q2wM++Tuv/WKvgIiyR iRY7zB9R7hUZ6Fd1Bor2f2sMIesHmkM= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 5F5A4AC5F; Mon, 5 Oct 2020 14:03:33 +0000 (UTC) Date: Mon, 5 Oct 2020 16:03:30 +0200 From: Michal Hocko To: David Hildenbrand Cc: Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Pavel Tatashin , Oscar Salvador , Joonsoo Kim Subject: Re: [PATCH 8/9] mm, page_alloc: drain all pcplists during memory offline Message-ID: <20201005140330.GD4555@dhcp22.suse.cz> References: <20200922143712.12048-1-vbabka@suse.cz> <20200922143712.12048-9-vbabka@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000003, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri 25-09-20 12:46:27, David Hildenbrand wrote: > On 22.09.20 16:37, Vlastimil Babka wrote: [...] > > +/* > > + * Spill all the per-cpu pages from all CPUs back into the buddy allocator. > > + * > > + * When zone parameter is non-NULL, spill just the single zone's pages. > > + * > > + * Note that this can be extremely slow as the draining happens in a workqueue. > > + */ > > +void drain_all_pages(struct zone *zone) > > +{ > > + __drain_all_pages(zone, false); > > +} > > + > > #ifdef CONFIG_HIBERNATION > > > > /* > > > > Interesting race. Instead of this ugly __drain_all_pages() with a > boolean parameter, can we have two properly named functions to be used > in !page_alloc.c code without scratching your head what the difference is? I tend to agree here. I would even fold this into the next patch because disable/enable interface is much more manageable. -- Michal Hocko SUSE Labs