Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1908706pxa; Thu, 6 Aug 2020 20:26:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytjHMts7431AFNaNpATRy9HZ+6bMn15Bk/57PCpKgP0uiOwmnaJdeBSjYlBFWU035GsJL9 X-Received: by 2002:a50:ee96:: with SMTP id f22mr6678155edr.243.1596770761858; Thu, 06 Aug 2020 20:26:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596770761; cv=none; d=google.com; s=arc-20160816; b=NqfGBQfCNRc5E8aIzrjO5V/85wuiDIOfbUG4KCUynfDV8rUwZISppdfjfddDdBSYg7 YL+B9tLUrvMya7TTQ+csu5IYnN0PDKXr66LwzA7DkP0zTPSXcRzt3oW+K+Z7jT9tN0lJ hglHw7FFo7YHZs6KZN9L0k8l+zbkStN8pERBC+pbbxDTwkakAfxoDqwf5MveeExNLpmP RCzMGrLkdkS+lCfHJc5HxL294skpc9Bn2RtKwNpDdZIsEJzQphcBoU6kcUNuq/x8hMi9 mJ3gGHiTSCBnv0dltWmQ0KApVh0CMW0obKELD85JgOhyrXqxY7bEyjzu14fgbUAYJxIE xOQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=CkqXx+H/lj4oZOwekQ12Up9TlQXmAj71bwHLX8Z6cC4=; b=pYoDrvkqzmGbBq8s+W5oZoWK0ZWvcM0VCG+PQizoOwracav2n4NV6NQCBH50t8+UV6 /iU/TsR2Xu8IsDB5RwEAA3mPRfA/3z13CoiimYoZEaJYSdiaKAI26QeBo9d5syQHxTx4 bDZpBPAAIh62RdSB0rBdmXtHF+TCeV6EmZiJ9FF6H3t7YjS2/AacXLOTOjcFNRDpZZl2 0OFV9NqvWh05rZe8ItrGroBinFIx4aaQvOHhVL2XNP8A/+Iz5SLqv0EXCqjhZisILxwk 9SldLol+vMPugoGfAUR4hR+gAl0YwLPJCMtDWOVWWsdsuq46f3c3QXp5sEeekqPjHurn ZoOg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x18si4880777ejd.265.2020.08.06.20.25.39; Thu, 06 Aug 2020 20:26:01 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726217AbgHGDZC (ORCPT + 99 others); Thu, 6 Aug 2020 23:25:02 -0400 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:44478 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726027AbgHGDZC (ORCPT ); Thu, 6 Aug 2020 23:25:02 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04427;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=19;SR=0;TI=SMTPD_---0U4zaDnJ_1596770697; Received: from IT-FVFX43SYHV2H.local(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0U4zaDnJ_1596770697) by smtp.aliyun-inc.com(127.0.0.1); Fri, 07 Aug 2020 11:24:58 +0800 Subject: Re: [PATCH v17 14/21] mm/compaction: do page isolation first in compaction To: Alexander Duyck Cc: Andrew Morton , Mel Gorman , Tejun Heo , Hugh Dickins , Konstantin Khlebnikov , Daniel Jordan , Yang Shi , Matthew Wilcox , Johannes Weiner , kbuild test robot , linux-mm , LKML , cgroups@vger.kernel.org, Shakeel Butt , Joonsoo Kim , Wei Yang , "Kirill A. Shutemov" , Rong Chen References: <1595681998-19193-1-git-send-email-alex.shi@linux.alibaba.com> <1595681998-19193-15-git-send-email-alex.shi@linux.alibaba.com> From: Alex Shi Message-ID: <241ca157-104f-4f0d-7d5b-de394443788d@linux.alibaba.com> Date: Fri, 7 Aug 2020 11:24:35 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2020/8/7 上午2:38, Alexander Duyck 写道: >> + >> isolate_abort: >> if (locked) >> spin_unlock_irqrestore(&pgdat->lru_lock, flags); >> + if (page) { >> + SetPageLRU(page); >> + put_page(page); >> + } >> >> /* >> * Updated the cached scanner pfn once the pageblock has been scanned > We should probably be calling SetPageLRU before we release the lru > lock instead of before. It might make sense to just call it before we > get here, similar to how you did in the isolate_fail_put case a few > lines later. Otherwise this seems to violate the rules you had set up > earlier where we were only going to be setting the LRU bit while > holding the LRU lock. Hi Alex, Set out of lock here should be fine. I never said we must set the bit in locking. And this page is get by get_page_unless_zero(), no warry on release. Thanks Alex