From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xa7WF-0007VW-2Z for qemu-devel@nongnu.org; Fri, 03 Oct 2014 14:23:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xa7WE-0005IT-7y for qemu-devel@nongnu.org; Fri, 03 Oct 2014 14:23:55 -0400 Received: from mail-vc0-x22b.google.com ([2607:f8b0:400c:c03::22b]:53891) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xa7WD-0005IN-TP for qemu-devel@nongnu.org; Fri, 03 Oct 2014 14:23:54 -0400 Received: by mail-vc0-f171.google.com with SMTP id hy10so1037948vcb.2 for ; Fri, 03 Oct 2014 11:23:53 -0700 (PDT) MIME-Version: 1.0 Sender: linus971@gmail.com In-Reply-To: <1412356087-16115-5-git-send-email-aarcange@redhat.com> References: <1412356087-16115-1-git-send-email-aarcange@redhat.com> <1412356087-16115-5-git-send-email-aarcange@redhat.com> Date: Fri, 3 Oct 2014 11:23:53 -0700 Message-ID: From: Linus Torvalds Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 04/17] mm: gup: make get_user_pages_fast and __get_user_pages_fast latency conscious List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrea Arcangeli Cc: Robert Love , Dave Hansen , Jan Kara , KVM list , Neil Brown , Stefan Hajnoczi , qemu-devel@nongnu.org, linux-mm , KOSAKI Motohiro , Michel Lespinasse , Taras Glek , Andrew Jones , Juan Quintela , Hugh Dickins , Isaku Yamahata , Mel Gorman , Sasha Levin , Android Kernel Team , "\\Dr. David Alan Gilbert\\" , "Huangpeng (Peter)" , Andres Lagar-Cavilla , Christopher Covington , Anthony Liguori , Mike Hommey , Keith Packard , Wenchao Xia , Linux API , Linux Kernel Mailing List , Andy Lutomirski , Minchan Kim , Dmitry Adamushko , Johannes Weiner , Paolo Bonzini , Andrew Morton , Peter Feiner On Fri, Oct 3, 2014 at 10:07 AM, Andrea Arcangeli wrote: > This teaches gup_fast and __gup_fast to re-enable irqs and > cond_resched() if possible every BATCH_PAGES. This is disgusting. Many (most?) __gup_fast() users just want a single page, and the stupid overhead of the multi-page version is already unnecessary. This just makes things much worse. Quite frankly, we should make a single-page version of __gup_fast(), and convert existign users to use that. After that, the few multi-page users could have this extra latency control stuff. And yes, the single-page version of get_user_pages_fast() is actually latency-critical. shared futexes hit it hard, and yes, I've seen this in profiles. Linus