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.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 B086BC433E2 for ; Thu, 3 Sep 2020 19:35:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5EC1420722 for ; Thu, 3 Sep 2020 19:35:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hjyGCJ1e" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EC1420722 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E90AD6B0072; Thu, 3 Sep 2020 15:35:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E6772900002; Thu, 3 Sep 2020 15:35:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D7C6C6B0082; Thu, 3 Sep 2020 15:35:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0107.hostedemail.com [216.40.44.107]) by kanga.kvack.org (Postfix) with ESMTP id C46F96B0072 for ; Thu, 3 Sep 2020 15:35:43 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 8F3D8181AC9CC for ; Thu, 3 Sep 2020 19:35:43 +0000 (UTC) X-FDA: 77222754966.06.price43_150f051270ac Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 912F910042609 for ; Thu, 3 Sep 2020 19:35:42 +0000 (UTC) X-HE-Tag: price43_150f051270ac X-Filterd-Recvd-Size: 5491 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Thu, 3 Sep 2020 19:35:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599161741; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xXOwKUGDQe0r+n3R2kxDgNdz0mCw+pqUmJrIUA7nXG4=; b=hjyGCJ1en8yxMAxFHiVdbMeYVmN0wtpoainepVU75OiNlMFTwEQXha0qupew2WmlcwdkKZ 4EQfo/PplnkMk+ZarETCfUjW92Laq3NTguQo9hffstWVEL3J1EZcE1Eo1vUDprAsJ4DNIX ciYlxWVNRAVAE3eubR/2BL/erM11j5g= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-239-DCGVRW8_O0uUqrmDuoGZIw-1; Thu, 03 Sep 2020 15:35:39 -0400 X-MC-Unique: DCGVRW8_O0uUqrmDuoGZIw-1 Received: by mail-ej1-f70.google.com with SMTP id b23so1652790ejv.2 for ; Thu, 03 Sep 2020 12:35:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=HCyBRNagum+nnv7ajU0MzZ+M38TwovtYpjuUsvYy9UI=; b=BuUe4q1xNcZzQtt90U8gqM264eABoWgS3uXlFT+7Zz9JdZGbTiz0XsexYYKnaAOvIL DKZsqPKO6wrOXF6PO55lSk4QsEws8wigQNSn1PlnquJcJ34nG72m/s4qtcq4/8EhwaA5 qPxjSiQ6tt8oRUQCFrCntMeDLC5rUzK3fY1oZWwamyq6pyqtx976YdA0ysvesqiatXp9 rxN6qcJ0AMlsBJpqPAbq3UnvAtDtIeQjBhgQJzkGgcRYVZ/CnHSS97/0Xu8ax9t9pBJC fKV++XJlEjbhFF3iSbQ0BFKEhvO/se6hHq2uwueChfL6MsabNaxzJxRmRiSUWbUwRn+s +zOQ== X-Gm-Message-State: AOAM533HPeebC5QARrFuVwCB9Xs0M7v5BpR0LiGy7D5g8vlJQfgwF789 Vu+958e86POkGAz1YfKcyVVn/o+TD7Yd/SwRyIJRymiTbuz9q67TEjmcrWjF+AwSxcB13Sz71tl fU7r59LmsqyE= X-Received: by 2002:a17:907:72c5:: with SMTP id du5mr3943332ejc.469.1599161738346; Thu, 03 Sep 2020 12:35:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVJXCj6u9zMSZeQq1jRBH6YJG3dd5tBUSi08e2VQGu1JA8wnnzfa+aGyb9qQTLE9nTibaNNg== X-Received: by 2002:a17:907:72c5:: with SMTP id du5mr3943319ejc.469.1599161738112; Thu, 03 Sep 2020 12:35:38 -0700 (PDT) Received: from [192.168.3.122] (p4ff23bcb.dip0.t-ipconnect.de. [79.242.59.203]) by smtp.gmail.com with ESMTPSA id d13sm3024664edl.68.2020.09.03.12.35.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Sep 2020 12:35:37 -0700 (PDT) From: David Hildenbrand Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v2] mm/memory_hotplug: drain per-cpu pages again during memory offline Date: Thu, 3 Sep 2020 21:35:35 +0200 Message-Id: References: <20200903123136.1fa50e773eb58c6200801e65@linux-foundation.org> Cc: David Hildenbrand , Pavel Tatashin , linux-kernel@vger.kernel.org, mhocko@suse.com, linux-mm@kvack.org, osalvador@suse.de, richard.weiyang@gmail.com, vbabka@suse.cz, rientjes@google.com In-Reply-To: <20200903123136.1fa50e773eb58c6200801e65@linux-foundation.org> To: Andrew Morton X-Mailer: iPhone Mail (17G68) Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0.502 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 912F910042609 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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: > Am 03.09.2020 um 21:31 schrieb Andrew Morton : >=20 > =EF=BB=BFOn Thu, 3 Sep 2020 19:36:26 +0200 David Hildenbrand wrote: >=20 >> (still on vacation, back next week on Tuesday) >>=20 >> 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. >>=20 >> 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. >>=20 >> I want that fixed instead if possible, otherwise this is just an ugly >> hack to make the obvious symptoms (offlining looping forever) disappear. >>=20 >> 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?). >>=20 >=20 > 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 as a stable fix, but I really want to see a proper fix (e.g., disabl= ing PCP while having isolated pageblocks) on top. >=20 > Unless you think there's some new misbehaviour which we might see as a > result of this approach? >=20 We basically disable PCP by keeping to flush it. But performance shouldn=E2= =80=98t matter.