Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750938AbbG2Jyp (ORCPT ); Wed, 29 Jul 2015 05:54:45 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:33589 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750756AbbG2Jyn (ORCPT ); Wed, 29 Jul 2015 05:54:43 -0400 Date: Wed, 29 Jul 2015 11:54:40 +0200 From: Michal Hocko To: =?iso-8859-1?Q?J=F6rn?= Engel Cc: Spencer Baugh , Toshi Kani , Andrew Morton , Fengguang Wu , Joern Engel , "Kirill A. Shutemov" , Mel Gorman , Johannes Weiner , Shachar Raindel , Boaz Harrosh , Andy Lutomirski , Joonsoo Kim , Andrey Ryabinin , Roman Pen , Andrey Konovalov , Eric Dumazet , Dmitry Vyukov , Rob Jones , WANG Chao , open list , "open list:MEMORY MANAGEMENT" , Spencer Baugh Subject: Re: [PATCH] mm: add resched points to remap_pmd_range/ioremap_pmd_range Message-ID: <20150729095439.GD15801@dhcp22.suse.cz> References: <1437688476-3399-3-git-send-email-sbaugh@catern.com> <20150724070420.GF4103@dhcp22.suse.cz> <20150724165627.GA3458@Sligo.logfs.org> <20150727070840.GB11317@dhcp22.suse.cz> <20150727151814.GR9641@Sligo.logfs.org> <20150728133254.GI24972@dhcp22.suse.cz> <20150728170844.GY9641@Sligo.logfs.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150728170844.GY9641@Sligo.logfs.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1447 Lines: 31 On Tue 28-07-15 10:08:44, J?rn Engel wrote: > On Tue, Jul 28, 2015 at 03:32:55PM +0200, Michal Hocko wrote: > > > > > > We have kernel preemption disabled. A lower-priority task in a system > > > call will block higher-priority tasks. > > > > This is an inherent problem of !PREEMPT, though. There are many > > loops which can take quite some time but we do not want to sprinkle > > cond_resched all over the kernel. On the other hand these io/remap resp. > > vunmap page table walks do not have any cond_resched points AFAICS so we > > can at least mimic zap_pmd_range which does cond_resched. > > Even for !PREEMPT we don't want infinite scheduler latencies. Real > question is how much we are willing to accept and at what point we > should start sprinkling cond_resched. I would pick 100ms, but that is > just a personal choice. If we decide on 200ms or 500ms, I can live with > that too. I do not thing this is about a magic value. It is more about natural places for scheduling point. As I've written above cond_resched at pmd level of the page table walk sounds reasonable to me as we do that already for zap_pmd_range and consistency would make sense to me. -- Michal Hocko SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/