Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1001209ybh; Wed, 11 Mar 2020 15:22:15 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs+zxP7OMuDXgXknClyEcLN+LiVauZ7yEZSuixPu2eqpvGPTVEZZhnilw2aciONC4dV2nwy X-Received: by 2002:aca:4c57:: with SMTP id z84mr589537oia.53.1583965335545; Wed, 11 Mar 2020 15:22:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583965335; cv=none; d=google.com; s=arc-20160816; b=r7e5pv39v2iLn1gmp1jGQaMRaxLUfihssPgLTH8UiUuRfmaFyGyYvDHA94UxFUM2oS +Chrec4QrFp3UWpFfpydZtrfXohkZYWJnOwWr3l0iaBh/U6DKMa5hH3xRK4t72BB2EnJ +/Zpq+W5xpf8uoQ5BLKTdgNPVWu8ca6/hiL05+goaokTn2OjoBw7O+joO1ZQxRi0Vkp3 hqkL4z4m7lQg11cCJVQtzo6RVz3I6OukwPAg2sLMRRNP6+jkzdlEqTDQCtt0u2fuXuQ9 AuYSH61ov6OM8rIGCdRC6EqPiVOpEBNpJWonghzd2fOp9MxgVORkBxLkt7pfgfHg7LPC mEmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=re4Xqup+0OnUX9Tz0WraCDJmxI3GOSpKdsIVzbjsSDs=; b=o+fnbivKUGMdupld01FpDW3Cs5b2uD+qYePCOo6gCxiu4Fq1BbvbOAKzsCBUsDFPMv 3fBRTWH9GEGKbdaLbxbcLrd160cDYOhY0LRoHlUZ0aGk5ZM0572/PGUMTVJ87rHpdwCj zI9Z55Y1qancm/KczWA4GP50pN5TVpKfWXK/n+0yw3Q0UitmyHG5U2/dcDOmRroFn6NZ 5Z+089PRWL43aKFDGYeq+x9OSzZvekDyBkEm+tXK7pfxQh+gpF5Q8HlcM7bSozUI+nSW euNgIbxUjMxreFaHXoSUa0xlckf39h3UOHj5qbJlOK5DwW064Hb8MAiCAIQCmzjwl+OJ u/Hg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w26si1696241otk.156.2020.03.11.15.22.03; Wed, 11 Mar 2020 15:22:15 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729956AbgCKWVV (ORCPT + 99 others); Wed, 11 Mar 2020 18:21:21 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:50763 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729506AbgCKWVU (ORCPT ); Wed, 11 Mar 2020 18:21:20 -0400 Received: from mail-qk1-f170.google.com ([209.85.222.170]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPSA (Nemesis) id 1MfYHQ-1jniWk46VU-00g00q; Wed, 11 Mar 2020 23:21:19 +0100 Received: by mail-qk1-f170.google.com with SMTP id f3so3803357qkh.1; Wed, 11 Mar 2020 15:21:18 -0700 (PDT) X-Gm-Message-State: ANhLgQ1NrVE1szSl2hCxhmSdG53rWyaQCTZZHUSFzuAvOX7qz9FlmnF+ FKpe+9KgM7wU5O4JEd9eVVyBlyY95z4mRI9ndsM= X-Received: by 2002:a37:8707:: with SMTP id j7mr2513764qkd.394.1583965277788; Wed, 11 Mar 2020 15:21:17 -0700 (PDT) MIME-Version: 1.0 References: <671b05bc-7237-7422-3ece-f1a4a3652c92@oracle.com> <7c4c1459-60d5-24c8-6eb9-da299ead99ea@oracle.com> <20200306203439.peytghdqragjfhdx@kahuna> <20200309155945.GA4124965@arrakis.emea.arm.com> <20200309160919.GM25745@shell.armlinux.org.uk> <20200311142905.GI3216816@arrakis.emea.arm.com> <20200311172631.GN3216816@arrakis.emea.arm.com> In-Reply-To: <20200311172631.GN3216816@arrakis.emea.arm.com> From: Arnd Bergmann Date: Wed, 11 Mar 2020 23:21:01 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] vfs: keep inodes with page cache off the inode shrinker LRU To: Catalin Marinas Cc: Russell King - ARM Linux admin , Nishanth Menon , Santosh Shilimkar , Tero Kristo , Linux ARM , Michal Hocko , Rik van Riel , Santosh Shilimkar , Dave Chinner , Linux Kernel Mailing List , Linux-MM , Yafang Shao , Al Viro , Johannes Weiner , linux-fsdevel , kernel-team@fb.com, Kishon Vijay Abraham I , Linus Torvalds , Andrew Morton , Roman Gushchin Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:Y0fVglcNi3gC72aK5fXtxypkAayJT+12w8tKLgShmO81/UTcoGJ NdV/92mYk8imJkqroooPsdEHiKdRRN6F6UWDDjRr8+bYhc5r4TIZ8WmnatiYiN/Kg5yr1M/ UbHjNq/hbtQbj/6+qkvyNKI17QCXz12qQ+d9JGjmlQin9Ezop/VL7stF0tRA2/xPKpmofuX M5f18TPitTjgFno3DmrZQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:sKJPphkq4EU=:s0gkVx3Zr91ZibRaHVQ6T/ Bx8qEqbhocegEone2+WgCDYZxhn76WohWqU0SDLTtKHCR43POf57Tf3V3ZG5qvdShaZH2saWT 9c/h9McjfTbNrnwr7DEjlVE3/R0c97BQkA8TLFDnZYbYP268BHe9Kg8OZlHcsVdD4d6+TAUCs xf8OWwH9BdY/cbBSp+zrturUtr2K35c76uOVGPACWaf4xPjCRI9BnzvxobPiP7UP2w659Q+sC 7FdYkx0UPJTgeoeoREOBKODGMXQunqlZJqgTkrEXquJAQTdKNEB83gbf9Hcgwjhyppy4/tqa3 akkuLAOvHM3GcRco3ahM3Le3IAcA3vWLUGMxt7bCqp/os1B7KNZ5YZLOgXiaaDwhFEn/Gw4zv XM113yRMdhImu3iDti7OfwGUa05JZYAy9Nll1mwi1MsnjOWf+k6erTmQ62Gfm6K19N6x4BM97 i6DOpdVI5fGlypTbHVF49Qbi2rBcTx5UI/U4mUj0vcp3mAze9bOcHeGnXqzEwHAlGtv+VxIel DWp0mwQBglh5NPtiNazlec1dBFHNx9ssGPbMkqr92HLp4EA3+/jVl6EKnMzEHemFmO+3pVyZJ 3+y0wXpOp/8hgUhHqOXUTq28EP6996iCf+NzM2d1qEHIyt3na19BBl9bpCtNRHhb5hLlZkgja YK0MvMJwRmZ7osBuNW55IRjuX8adIzLY/hKRhX9hFNI7c+thIT7q1uToHb0tQi/3HSlti/xQf huMxHQy/crOq5HKWWAar/Sc6wAEN+v1C0y3+FjA+2EYT2dFD4wZrU1WDUmd+gLe/Uv7Q6NQY3 UwHZ2s00xnp47xalH6ACgrI14db+S11O2zzm/D9pic+xBS6wwQ= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 11, 2020 at 6:26 PM Catalin Marinas wrote: > On Wed, Mar 11, 2020 at 05:59:53PM +0100, Arnd Bergmann wrote: > > On Wed, Mar 11, 2020 at 3:29 PM Catalin Marinas wrote: > > Do you have an estimate of how long writing to TTBR0_64 takes on Cortex-A7 > > and A15, respectively? > > I don't have numbers but it's usually not cheap since you need an ISB to > synchronise the context after TTBR0 update (basically flushing the > pipeline). Ok. > > Another way might be to use a use a temporary buffer that is already > > mapped, and add a memcpy() through L1-cache to reduce the number > > of ttbr0 changes. The buffer would probably have to be on the stack, > > which limits the size, but for large copies get_user_pages()+memcpy() > > may end up being faster anyway. > > IIRC, the x86 attempt from Ingo some years ago was using > get_user_pages() for uaccess. Depending on the size of the buffer, this > may be faster than copying twice. I guess the tradeoffs for that were rather different, as x86 back then had no ASIDs, so changing the page tables required a full TLB flush. Arnd