From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5AB51C388F7 for ; Tue, 3 Nov 2020 12:25:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9776322409 for ; Tue, 3 Nov 2020 12:25:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="S3ilUxfL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9776322409 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A99456B0096; Tue, 3 Nov 2020 07:25:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A20FC6B0093; Tue, 3 Nov 2020 07:25:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8C0206B0096; Tue, 3 Nov 2020 07:25:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0100.hostedemail.com [216.40.44.100]) by kanga.kvack.org (Postfix) with ESMTP id 583606B0092 for ; Tue, 3 Nov 2020 07:25:48 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id F1E7382499A8 for ; Tue, 3 Nov 2020 12:25:47 +0000 (UTC) X-FDA: 77443028334.08.tail87_3209700272b8 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id B9E101819E76B; Tue, 3 Nov 2020 12:25:47 +0000 (UTC) X-HE-Tag: tail87_3209700272b8 X-Filterd-Recvd-Size: 5602 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf02.hostedemail.com (Postfix) with ESMTP; Tue, 3 Nov 2020 12:25:46 +0000 (UTC) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2C43222456; Tue, 3 Nov 2020 12:25:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604406345; bh=JnG9AEM3urtQJZbyh27ncRK5xtNjXhkMpT9pLY6ruAw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=S3ilUxfLmh/0Pv4skyGqFEAG0vwDSS5i5psimoXmAELMEWHSH2fW4IuM4Z+qMebRf WAXWrrJnkn0me0BHoC6LmAQbdfefgrg1IUndUDBw+RKZdCT9Ym0K7hlLMGCU1lFFO3 Zsx6vPAhW90E/61D8322HI52wvm4X0FuC5QxUJR0= Received: by mail-wr1-f41.google.com with SMTP id x7so18365178wrl.3; Tue, 03 Nov 2020 04:25:45 -0800 (PST) X-Gm-Message-State: AOAM5307cK3xz+/XwXrsrFAmHw/AO/m+vLWYK7aGrdAtGfJdBJbFmuhU 1+v+eOTCrUHNOl5AosYD8uGkmRqkVSnWdd58VlI= X-Google-Smtp-Source: ABdhPJzaMTU0V4sDEP7WFi1D19pueRl5ySNY/GA/QmiGvW8mi19ZpCI6gDmcGIwe2rHXpOPoRB6cN5TL6gD3Vvt/QEU= X-Received: by 2002:adf:eb4f:: with SMTP id u15mr19654094wrn.165.1604406343518; Tue, 03 Nov 2020 04:25:43 -0800 (PST) MIME-Version: 1.0 References: <20201103092712.714480842@linutronix.de> <20201103095857.078043987@linutronix.de> In-Reply-To: <20201103095857.078043987@linutronix.de> From: Arnd Bergmann Date: Tue, 3 Nov 2020 13:25:27 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch V3 05/37] asm-generic: Provide kmap_size.h To: Thomas Gleixner Cc: LKML , Linus Torvalds , Peter Zijlstra , Paul McKenney , Christoph Hellwig , Sebastian Andrzej Siewior , Andrew Morton , Linux-MM , Alexander Viro , Benjamin LaHaise , Linux FS-devel Mailing List , linux-aio , Chris Mason , Josef Bacik , David Sterba , linux-btrfs , "the arch/x86 maintainers" , Vineet Gupta , "open list:SYNOPSYS ARC ARCHITECTURE" , Russell King , Arnd Bergmann , Linux ARM , linux-csky@vger.kernel.org, Michal Simek , Thomas Bogendoerfer , "open list:BROADCOM NVRAM DRIVER" , Nick Hu , Greentime Hu , Vincent Chen , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev , "David S. Miller" , sparclinux , Chris Zankel , Max Filippov , linux-xtensa@linux-xtensa.org, Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Christian Koenig , Huang Rui , David Airlie , Daniel Vetter , dri-devel , VMware Graphics , Roland Scheidegger , Dave Airlie , Gerd Hoffmann , virtualization@lists.linux-foundation.org, spice-devel@lists.freedesktop.org, Ben Skeggs , ML nouveau , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Intel Graphics Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Nov 3, 2020 at 10:27 AM Thomas Gleixner wrote: > > kmap_types.h is a misnomer because the old atomic MAP based array does not > exist anymore and the whole indirection of architectures including > kmap_types.h is inconinstent and does not allow to provide guard page > debugging for this misfeature. > > Add a common header file which defines the mapping stack size for all > architectures. Will be used when converting architectures over to a > generic kmap_local/atomic implementation. > > The array size is chosen with the following constraints in mind: > > - The deepest nest level in one context is 3 according to code > inspection. > > - The worst case nesting for the upcoming reemptible version would be: > > 2 maps in task context and a fault inside > 2 maps in the fault handler > 3 maps in softirq > 2 maps in interrupt > > So a total of 16 is sufficient and probably overestimated. > > Signed-off-by: Thomas Gleixner Acked-by: Arnd Bergmann