Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1914979imm; Thu, 18 Oct 2018 06:23:32 -0700 (PDT) X-Google-Smtp-Source: ACcGV63BP/ITvEQs6Cfa+AfBhcs18F0u+qimv1l94liA9VaosSnEJR3cXwtUZTi4ZAW6w1JYWcIG X-Received: by 2002:a63:ef0b:: with SMTP id u11-v6mr28487233pgh.283.1539869012385; Thu, 18 Oct 2018 06:23:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539869012; cv=none; d=google.com; s=arc-20160816; b=ydF51S3PHh8I+9BwB+JUEpjW6HhV8eL45i5vfUEFyR6miEsKYT8xK4nNkNRkINJRO+ WRDYNdB9liQC6ai6TBRjU2BjiBpLt259aqvZOL8WwOwzJu3ZhJquNXLvbXRKLLC/CFQD BlmDlaMDiuSKtNfmBO/fi0f3JXGdUDhFZYll0KUnPysoAdMTrRJIdLofx+RHY++nRpCT XVVxugLf5PTdliF8KmDWIJrV9PP9SZwN+po+AoiCuqkhdBiTiH9aNMQCLcjFbXuhiKUl RZ8uzbffH29oWaBriS7+9Em5kiSW3d+aL9Y9Jecz1QZPUNZkHJpe73Rnhd1d3hkcxtNB jT+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=/8ioCHYT1lij1mxYoipwRjy5erTW8o6ev1FK2tA6XwM=; b=W6YjJnMKoBPHer7/KrZGg2C2y+iDbQ5yfRLeyJeVNkpcWnngpgkjVSff8aiwmA+boj gaJ5ZQEv1NIjfaSzob03HNXOugB4mqpLIe0BJrNjgYRUsCCt+tJkPT/MUuSNW64Ju0OO TAI+FgDIi29+gmURWgNXjijTNe/ICGUB2ynvGZm2K162yWxMV3A8J7EFsrGtK4qpvTMf C7zv0HxYrGXIkZPdHE6bnpxM60TtVZuqFJvs9GVBTr+mPMflI+Nc874RNmEP88dtzK/8 aHCVv55KqqKStpZ3EczrItyvx6dKNitOvFTnKtCCrrh+LJQvz546uBRBjtLYiJfBZ8o0 3cvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i72-v6si21035044pfe.224.2018.10.18.06.23.17; Thu, 18 Oct 2018 06:23:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727955AbeJRVWe (ORCPT + 99 others); Thu, 18 Oct 2018 17:22:34 -0400 Received: from mga09.intel.com ([134.134.136.24]:28738 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727199AbeJRVWd (ORCPT ); Thu, 18 Oct 2018 17:22:33 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Oct 2018 06:21:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,396,1534834800"; d="scan'208";a="98517244" Received: from aaronlu.sh.intel.com (HELO intel.com) ([10.239.159.44]) by fmsmga004.fm.intel.com with ESMTP; 18 Oct 2018 06:21:29 -0700 Date: Thu, 18 Oct 2018 21:21:28 +0800 From: Aaron Lu To: Mel Gorman Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Huang Ying , Dave Hansen , Kemi Wang , Tim Chen , Andi Kleen , Michal Hocko , Vlastimil Babka , Matthew Wilcox , Daniel Jordan , Tariq Toukan , Jesper Dangaard Brouer Subject: Re: [RFC v4 PATCH 3/5] mm/rmqueue_bulk: alloc without touching individual page structure Message-ID: <20181018132128.GA17006@intel.com> References: <20181017063330.15384-1-aaron.lu@intel.com> <20181017063330.15384-4-aaron.lu@intel.com> <20181017112042.GK5819@techsingularity.net> <20181017142327.GB9167@intel.com> <20181018112055.GN5819@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181018112055.GN5819@techsingularity.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 18, 2018 at 12:20:55PM +0100, Mel Gorman wrote: > On Wed, Oct 17, 2018 at 10:23:27PM +0800, Aaron Lu wrote: > > > RT has had problems with cpu_relax in the past but more importantly, as > > > this delay for parallel compactions and allocations of contig ranges, > > > we could be stuck here for very long periods of time with interrupts > > > > The longest possible time is one CPU accessing pcp->batch number cold > > cachelines. Reason: > > When zone_wait_cluster_alloc() is called, we already held zone lock so > > no more allocations are possible. Waiting in_progress to become zero > > means waiting any CPU that increased in_progress to finish processing > > their allocated pages. Since they will at most allocate pcp->batch pages > > and worse case are all these page structres are cache cold, so the > > longest wait time is one CPU accessing pcp->batch number cold cache lines. > > > > I have no idea if this time is too long though. > > > > But compact_zone calls zone_wait_and_disable_cluster_alloc so how is the > disabled time there bound by pcp->batch? My mistake, I misunderstood spin_lock_irqsave() and thought lock would need be acquired before irq is disabled... So yeah, your concern of possible excessive long irq disabled time here is true.