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=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 7BF9CC43461 for ; Fri, 4 Sep 2020 12:42:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2AF97206F2 for ; Fri, 4 Sep 2020 12:42:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2AF97206F2 Authentication-Results: mail.kernel.org; dmarc=none (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 B5EF36B00BD; Fri, 4 Sep 2020 08:42:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B0F7C6B00BF; Fri, 4 Sep 2020 08:42:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A24D76B00C0; Fri, 4 Sep 2020 08:42:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0186.hostedemail.com [216.40.44.186]) by kanga.kvack.org (Postfix) with ESMTP id 8D5836B00BD for ; Fri, 4 Sep 2020 08:42:22 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 53722364B for ; Fri, 4 Sep 2020 12:42:22 +0000 (UTC) X-FDA: 77225342124.03.men55_200dc88270b2 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id 1BAA028A4E8 for ; Fri, 4 Sep 2020 12:42:22 +0000 (UTC) X-HE-Tag: men55_200dc88270b2 X-Filterd-Recvd-Size: 2716 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Fri, 4 Sep 2020 12:42:21 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 87E75ACB5; Fri, 4 Sep 2020 12:42:21 +0000 (UTC) Date: Fri, 4 Sep 2020 14:42:19 +0200 From: Michal Hocko To: Andrew Morton Cc: David Hildenbrand , Pavel Tatashin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, osalvador@suse.de, richard.weiyang@gmail.com, vbabka@suse.cz, rientjes@google.com Subject: Re: [PATCH v2] mm/memory_hotplug: drain per-cpu pages again during memory offline Message-ID: <20200904124219.GB4610@dhcp22.suse.cz> References: <20200903140032.380431-1-pasha.tatashin@soleen.com> <6ec66eb9-eeba-5076-af97-cef59ed5cbaa@redhat.com> <20200903123136.1fa50e773eb58c6200801e65@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200903123136.1fa50e773eb58c6200801e65@linux-foundation.org> X-Rspamd-Queue-Id: 1BAA028A4E8 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu 03-09-20 12:31:36, Andrew Morton wrote: > On Thu, 3 Sep 2020 19:36:26 +0200 David Hildenbrand wrote: > > > (still on vacation, back next week on Tuesday) > > > > I didn't look into discussions in v1, but to me this looks like we are > > trying to hide an actual bug by implementing hacks in the caller > > (repeated calls to drain_all_pages()). What about alloc_contig_range() > > users - you get more allocation errors just because PCP code doesn't > > play along. > > > > There *is* strong synchronization with the page allocator - however, > > there seems to be one corner case race where we allow to allocate pages > > from isolated pageblocks. > > > > I want that fixed instead if possible, otherwise this is just an ugly > > hack to make the obvious symptoms (offlining looping forever) disappear. > > > > If that is not possible easily, I'd much rather want to see all > > drain_all_pages() calls being moved to the caller and have the expected > > behavior documented instead of specifying "there is no strong > > synchronization with the page allocator" - which is wrong in all but PCP > > cases (and there only in one possible race?). > > > > It's a two-line hack which fixes a bug in -stable kernels, so I'm > inclined to proceed with it anyway. We can undo it later on as part of > a better fix, OK? Agreed. http://lkml.kernel.org/r/20200904070235.GA15277@dhcp22.suse.cz for reference. -- Michal Hocko SUSE Labs