From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f71.google.com (mail-pl0-f71.google.com [209.85.160.71]) by kanga.kvack.org (Postfix) with ESMTP id C08356B0003 for ; Fri, 29 Jun 2018 22:41:21 -0400 (EDT) Received: by mail-pl0-f71.google.com with SMTP id m2-v6so6030252plt.14 for ; Fri, 29 Jun 2018 19:41:21 -0700 (PDT) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org. [140.211.169.12]) by mx.google.com with ESMTPS id f4-v6si9289081pgc.522.2018.06.29.19.41.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jun 2018 19:41:20 -0700 (PDT) Date: Fri, 29 Jun 2018 19:41:17 -0700 From: Andrew Morton Subject: Re: [PATCH v4 00/17] khwasan: kernel hardware assisted address sanitizer Message-Id: <20180629194117.01b2d31e805808eee5c97b4d@linux-foundation.org> In-Reply-To: References: <20180627160800.3dc7f9ee41c0badbf7342520@linux-foundation.org> <20180628124039.8a42ab5e2994fb2876ff4f75@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Andrey Konovalov Cc: Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Catalin Marinas , Will Deacon , Christoph Lameter , Mark Rutland , Nick Desaulniers , Marc Zyngier , Dave Martin , Ard Biesheuvel , "Eric W . Biederman" , Ingo Molnar , Paul Lawrence , Geert Uytterhoeven , Arnd Bergmann , "Kirill A . Shutemov" , Greg Kroah-Hartman , Kate Stewart , Mike Rapoport , kasan-dev , linux-doc@vger.kernel.org, LKML , Linux ARM , linux-sparse@vger.kernel.org, Linux Memory Management List , Linux Kbuild mailing list , Kostya Serebryany , Evgeniy Stepanov , Lee Smith , Ramana Radhakrishnan , Jacob Bramley , Ruben Ayrapetyan , Jann Horn , Mark Brand , Chintan Pandya On Fri, 29 Jun 2018 14:45:08 +0200 Andrey Konovalov wrote: > >> What kind of memory consumption testing would you like to see? > > > > Well, 100kb or so is a teeny amount on virtually any machine. I'm > > assuming the savings are (much) more significant once the machine gets > > loaded up and doing work? > > So with clean kernel after boot we get 40 kb memory usage. With KASAN > it is ~120 kb, which is 200% overhead. With KHWASAN it's 50 kb, which > is 25% overhead. This should approximately scale to any amounts of > used slab memory. For example with 100 mb memory usage we would get > +200 mb for KASAN and +25 mb with KHWASAN. (And KASAN also requires > quarantine for better use-after-free detection). I can explicitly > mention the overhead in %s in the changelog. > > If you think it makes sense, I can also make separate measurements > with some workload. What kind of workload should I use? Whatever workload people were running when they encountered problems with KASAN memory consumption ;) I dunno, something simple. `find / > /dev/null'?