Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754789AbbGXRAm (ORCPT ); Fri, 24 Jul 2015 13:00:42 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:34800 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752532AbbGXRAk (ORCPT ); Fri, 24 Jul 2015 13:00:40 -0400 Date: Fri, 24 Jul 2015 10:00:35 -0700 From: =?iso-8859-1?Q?J=F6rn?= Engel To: Toshi Kani Cc: Spencer Baugh , Andrew Morton , Fengguang Wu , Joern Engel , "Kirill A. Shutemov" , Mel Gorman , Johannes Weiner , Michal Hocko , 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: <20150724170035.GB3458@Sligo.logfs.org> References: <1437688476-3399-3-git-send-email-sbaugh@catern.com> <1437694323.3214.353.camel@hp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1437694323.3214.353.camel@hp.com> 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: 2599 Lines: 59 On Thu, Jul 23, 2015 at 05:32:03PM -0600, Toshi Kani wrote: > On Thu, 2015-07-23 at 14:54 -0700, Spencer Baugh wrote: > > From: Joern Engel > > > > Mapping large memory spaces can be slow and prevent high-priority > > realtime threads from preempting lower-priority threads for a long time. > > Yes, and one of the goals of large page ioremap support is to address such > problem. Nice! Once we upgrade we should retest this one then. > > ------------[ cut here ]------------ > > WARNING: at arch/x86/kernel/irq.c:182 do_IRQ+0x126/0x140() > > Thread not rescheduled for 95 jiffies > > CPU: 14 PID: 6684 Comm: foo Tainted: G W O 3.10.59+ > > 0000000000000009 ffff883f7fbc3ee0 ffffffff8163a12c ffff883f7fbc3f18 > > ffffffff8103f131 ffff887f48275ac0 000000000000002f 000000000000007c > > 0000000000000000 00007fadd1e00000 ffff883f7fbc3f78 ffffffff8103f19c > > Call Trace: > > [] dump_stack+0x19/0x1b > > [] warn_slowpath_common+0x61/0x80 > > [] warn_slowpath_fmt+0x4c/0x50 > > [] ? rcu_irq_exit+0x77/0xc0 > > [] do_IRQ+0x126/0x140 > > [] common_interrupt+0x6f/0x6f > > [] ? _raw_spin_lock+0x13/0x30 > > [] __pte_alloc+0x31/0xc0 > > [] remap_pfn_range+0x45c/0x470 > > remap_pfn_range() does not have large page mappings support yet. So, yes, > this can still take a long time at this point. We can extend large page > support for this interface if necessary. A cond_resched() is enough to solve the latency impact. But I suspect large pages will perform better as well, so having that support would be appreciated. > > [] vfio_pci_mmap+0x148/0x210 [vfio_pci] > > [] vfio_device_fops_mmap+0x23/0x30 [vfio] > > [] mmap_region+0x3d8/0x5e0 > > [] do_mmap_pgoff+0x305/0x3c0 > > [] ? call_rwsem_down_write_failed+0x13/0x20 > > [] vm_mmap_pgoff+0x67/0xa0 > > [] SyS_mmap_pgoff+0x272/0x2e0 > > [] SyS_mmap+0x22/0x30 > > [] system_call_fastpath+0x16/0x1b > > ---[ end trace 6b0a8d2341444bde ]--- J?rn -- A defeated army first battles and then seeks victory. -- Sun Tzu -- 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/