Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3347471ybi; Mon, 29 Jul 2019 05:08:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqwQpie3XRu/OU9Cm1oPo/Uz6cdK+3ezKaNTY8sl3iPyt54M3otUOsWc1IZQOGVlln8YU8k7 X-Received: by 2002:a63:f50d:: with SMTP id w13mr103749339pgh.411.1564402097501; Mon, 29 Jul 2019 05:08:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564402097; cv=none; d=google.com; s=arc-20160816; b=Mi6IXTOfArhkd53ZloYYyAy8T4UyHqEWX1IYEcS2eWHslrPMf8k9a5jYhB9oabz2dF 3dgl/W9FJ2amEPi1pfDD9M5JyyTpYk+QxyuPKN8ODL8FI15XP6ZGZHP+YvU7yHDYCs9L 2L2IXkxAO4K6nlMEd5mv07aMSlZNL07S7pxoIeFN+MJBmkQZRmtTxewShH4A+SEtma3Y LbkFyvko3n0tyR9CO3s8+A7QBWjUVWgekZnpUpaY4a9E3vD8k4J0UzT+4z1e+1/nWhGG V+cBfs1vBed4lx2cfKfECe2JhO7e0m1xLsomGzSRVgIXWRehVloJxOo/k0V6Ct9vCzzD DkOA== 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=weFZ024Wz245V9Cv8k3Qru57y17L0kKufx1yaF/wZVg=; b=W2sYh0sRu9IzqPLQ4Sv/wB+ZcKft09Nz2xgwfKPGGraXNgUjgTu9EtsazZVwGbEAFA 1u+xBRlaXrWUi2OUZdtadIkQqC6WWj0xX7wmdBCBEj24LXE6Xep7jvdErCiL4JZq7S5f VS9VRVRpkjyj4EUgRGmnbBBI3QkZAGJhh8NabPL46ku82IHo+N15rFLSTFrz6qD9kTsG +nSGmqUHPjwbSyHL+YiNgx6l2BaA2iBEeBQMzJz2yjNBNYMSQXpZQjQdv5yNV4UWRtk2 UNmVoUZF2DRU1uu+XNHEHCXjEJMcg4STCf77LkyziEx08fvQyUrJeiXZtHqxS8ReiXT4 tpTA== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12si28559739pgj.124.2019.07.29.05.08.01; Mon, 29 Jul 2019 05:08:17 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727761AbfG2IfR (ORCPT + 99 others); Mon, 29 Jul 2019 04:35:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:50370 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727109AbfG2IfR (ORCPT ); Mon, 29 Jul 2019 04:35:17 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 739D4B023; Mon, 29 Jul 2019 08:35:16 +0000 (UTC) Date: Mon, 29 Jul 2019 10:35:15 +0200 From: Michal Hocko To: Minchan Kim Cc: Andrew Morton , LKML , linux-mm , Miguel de Dios , Wei Wang , Johannes Weiner , Mel Gorman Subject: Re: [PATCH] mm: release the spinlock on zap_pte_range Message-ID: <20190729083515.GD9330@dhcp22.suse.cz> References: <20190729071037.241581-1-minchan@kernel.org> <20190729074523.GC9330@dhcp22.suse.cz> <20190729082052.GA258885@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190729082052.GA258885@google.com> 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 Mon 29-07-19 17:20:52, Minchan Kim wrote: > On Mon, Jul 29, 2019 at 09:45:23AM +0200, Michal Hocko wrote: > > On Mon 29-07-19 16:10:37, Minchan Kim wrote: > > > In our testing(carmera recording), Miguel and Wei found unmap_page_range > > > takes above 6ms with preemption disabled easily. When I see that, the > > > reason is it holds page table spinlock during entire 512 page operation > > > in a PMD. 6.2ms is never trivial for user experince if RT task couldn't > > > run in the time because it could make frame drop or glitch audio problem. > > > > Where is the time spent during the tear down? 512 pages doesn't sound > > like a lot to tear down. Is it the TLB flushing? > > Miguel confirmed there is no such big latency without mark_page_accessed > in zap_pte_range so I guess it's the contention of LRU lock as well as > heavy activate_page overhead which is not trivial, either. Please give us more details ideally with some numbers. -- Michal Hocko SUSE Labs