From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by kanga.kvack.org (Postfix) with ESMTP id 58C4C6B006E for ; Fri, 3 Oct 2014 14:23:54 -0400 (EDT) Received: by mail-vc0-f174.google.com with SMTP id hq12so1020610vcb.5 for ; Fri, 03 Oct 2014 11:23:54 -0700 (PDT) Received: from mail-vc0-x231.google.com (mail-vc0-x231.google.com [2607:f8b0:400c:c03::231]) by mx.google.com with ESMTPS id o9si4839301vda.12.2014.10.03.11.23.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 03 Oct 2014 11:23:53 -0700 (PDT) Received: by mail-vc0-f177.google.com with SMTP id hq11so1013241vcb.8 for ; Fri, 03 Oct 2014 11:23:53 -0700 (PDT) MIME-Version: 1.0 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: Subject: Re: [PATCH 04/17] mm: gup: make get_user_pages_fast and __get_user_pages_fast latency conscious From: Linus Torvalds Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: To: Andrea Arcangeli Cc: qemu-devel@nongnu.org, KVM list , Linux Kernel Mailing List , linux-mm , Linux API , Andres Lagar-Cavilla , Dave Hansen , Paolo Bonzini , Rik van Riel , Mel Gorman , Andy Lutomirski , Andrew Morton , Sasha Levin , Hugh Dickins , Peter Feiner , "\\Dr. David Alan Gilbert\\" , Christopher Covington , Johannes Weiner , Android Kernel Team , Robert Love , Dmitry Adamushko , Neil Brown , Mike Hommey , Taras Glek , Jan Kara , KOSAKI Motohiro , Michel Lespinasse , Minchan Kim , Keith Packard , "Huangpeng (Peter)" , Isaku Yamahata , Anthony Liguori , Stefan Hajnoczi , Wenchao Xia , Andrew Jones , Juan Quintela 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 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org