Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1846764rwn; Fri, 9 Sep 2022 05:07:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR6dJhNIstaJiYG5OrmFHtavCLZBqUjjgGu204yZi/04TMryI1I2N1ORnNHIwIhrZ4tExoxm X-Received: by 2002:a63:9042:0:b0:438:8ef2:2476 with SMTP id a63-20020a639042000000b004388ef22476mr1623981pge.55.1662725274617; Fri, 09 Sep 2022 05:07:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662725274; cv=none; d=google.com; s=arc-20160816; b=zdFHe7ZVGb5DmDUlLhzq2MF77zfc50yfnUvFgoneMAzMYYiDM2MxCVg6ROVoaupmVJ dNonWMlEqMT822yovBO+KX+aprcuIJ82vhH33UdHOabeHO2ilARJrBT2Na8bnAipNXoj ySwt3afohsMNEnDYkOfHs3HSTTmkNhdmpMNxPxF6w5UKz9o5dHc6VXZ9cOb/K4/OCt7c ut38dldxa64xgRzMeEkbQ1XkkddnYSKuYfmnAd/Xz4Xnisn1IDt7ZzqsHJZozuRm/k+/ wcKMJbsHKaqH5Q+SmVEeXbHcoTPP0HWRBcxHExLFMhfS7mqCmRCXI9bxLvu4MvF1ksL1 idnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=P8mO4V6+jC7+cyazFgx5SIaIZ4GrrkSJvMkGYj1DVsk=; b=yVjr5fP4hvplacI7k4Ydh0So0LCZI5BJL7sLYnLkUsjNhEREDUj7XQo13RTFTZHaVl 2zJ/eWnEibcDkR5/CPhn3+z63R7tluLXbkvTotd/YNYsQkdf/7OCZxEzvdAifl43/rKL hJY4ja/ylb2SiULqEqlbnjmC3xxB7OVExjeGkg9fh4wd+khwE5OLSAxGn/9TqlfPSOci Xk+45AXfe+m8dnHQfJ1RvAjmLxrdOUsNndfjGJQM8I2mVkYy4VEtZrbK+/k5KSHruDAQ 0lXffrww+4iinN3TBzDZMydRoGetgdTdKVkqOH/oa+ql5ZYO412cjl7vVSx2VQvt4iNT FTEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=itlJDE0Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n1-20020a632701000000b0043041b4ed5csi362323pgn.610.2022.09.09.05.07.41; Fri, 09 Sep 2022 05:07:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=itlJDE0Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230287AbiIILbJ (ORCPT + 99 others); Fri, 9 Sep 2022 07:31:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229601AbiIILbH (ORCPT ); Fri, 9 Sep 2022 07:31:07 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D1C411B008 for ; Fri, 9 Sep 2022 04:31:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662723066; 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=P8mO4V6+jC7+cyazFgx5SIaIZ4GrrkSJvMkGYj1DVsk=; b=itlJDE0YnTbeL/xsf4Sb2bipjiOmyAOiwCryH5xPHHNKQurqt0gkvLNa0FepCfvwqzeoVj daLsINVYBd2eyqFTcB0c0qX8tPluneZkSBsrcRFiv4++QWHXB9FOxiwUWdQMF9xyCYUzVg Mjs1gHmNr5P3QRcMkJISy1lOmco42q0= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-519-3CA2Lg9KOPWrhtezg_bl1w-1; Fri, 09 Sep 2022 07:31:04 -0400 X-MC-Unique: 3CA2Lg9KOPWrhtezg_bl1w-1 Received: by mail-wm1-f70.google.com with SMTP id p3-20020a7bcc83000000b003b2973dab4bso2642679wma.1 for ; Fri, 09 Sep 2022 04:31:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date; bh=P8mO4V6+jC7+cyazFgx5SIaIZ4GrrkSJvMkGYj1DVsk=; b=dkXhxpxx8sd+ANW+hpaZx3Y+5xZWxkGbodea4BFKE/du9NieBggBFjEGgySs37A/QA YCPpbmYDkrifXjQIfQJykf5oEjngJ/HMifJcBU9quFpcaPn1pwmWaECnU6Skbt3i+7la 8oW27wJgzY6t9uMyqDuA2dbBRN9AmIUmuzTb2UQFZRoGLjN7avU9/zu/ogzQ8hNdATet SwdwKbH/hwLe6cEYwgK+jitSIvKE21b2R2a8HfU6ijb4WnYno3prZyAGrD4IakxNPwIT GH2W/rl1r3Ld3ZuiuoYRz8HHLq73sV2khnwBolR3RcCW8dKN03QTTRjWjf5kPpxkgDTb GG6w== X-Gm-Message-State: ACgBeo0ElPKYeSlQUpWMwr7DjXv8toO1h5X+GW6nJAbXWw2qIvwQSxLO MEHeBCjXAy7GVh74sRDU7WTMVYnW8mGp5cZxGXNU8ODcKYJ9dQycliLCVNlUbCjOLLN8kStmWKi VFHTZCWsdkgvK1SfxYJwVOBIb X-Received: by 2002:a05:600c:19d3:b0:3a8:3b06:655a with SMTP id u19-20020a05600c19d300b003a83b06655amr5127033wmq.182.1662723063241; Fri, 09 Sep 2022 04:31:03 -0700 (PDT) X-Received: by 2002:a05:600c:19d3:b0:3a8:3b06:655a with SMTP id u19-20020a05600c19d300b003a83b06655amr5127014wmq.182.1662723062925; Fri, 09 Sep 2022 04:31:02 -0700 (PDT) Received: from ?IPV6:2003:cb:c704:6300:1fe0:42e1:62c5:91b6? (p200300cbc70463001fe042e162c591b6.dip0.t-ipconnect.de. [2003:cb:c704:6300:1fe0:42e1:62c5:91b6]) by smtp.gmail.com with ESMTPSA id q127-20020a1c4385000000b003a5f54e3bbbsm307401wma.38.2022.09.09.04.31.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Sep 2022 04:31:02 -0700 (PDT) Message-ID: Date: Fri, 9 Sep 2022 13:31:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH 08/16] mm/page_alloc: add missing is_migrate_isolate() check in set_page_guard() Content-Language: en-US To: Miaohe Lin , akpm@linux-foundation.org Cc: osalvador@suse.de, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20220909092451.24883-1-linmiaohe@huawei.com> <20220909092451.24883-9-linmiaohe@huawei.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20220909092451.24883-9-linmiaohe@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09.09.22 11:24, Miaohe Lin wrote: > In MIGRATE_ISOLATE case, zone freepage state shouldn't be modified as > caller will take care of it. Add missing is_migrate_isolate() here to > avoid possible unbalanced freepage state. > > Signed-off-by: Miaohe Lin > --- > mm/page_alloc.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index a35ef385d906..94baf33da865 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -873,7 +873,8 @@ static inline bool set_page_guard(struct zone *zone, struct page *page, > INIT_LIST_HEAD(&page->buddy_list); > set_page_private(page, order); > /* Guard pages are not available for any usage */ > - __mod_zone_freepage_state(zone, -(1 << order), migratetype); > + if (!is_migrate_isolate(migratetype)) > + __mod_zone_freepage_state(zone, -(1 << order), migratetype); > > return true; > } Do we have a fixes: tag for this one? Can it even happen that the pageblock is isolated when we end up in this function? IIUC, we'd have an allocation in an isolated pageblock, which would be wrong already? -- Thanks, David / dhildenb