Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp889806imu; Wed, 28 Nov 2018 00:57:03 -0800 (PST) X-Google-Smtp-Source: AFSGD/VTD4U/kbINPfZche8WHlZmiZ9L4zelJ7hq2Bxi62BmhkApv8jx1bAoD04m6GI+1HgEpBqH X-Received: by 2002:a63:df13:: with SMTP id u19mr32611677pgg.294.1543395423688; Wed, 28 Nov 2018 00:57:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543395423; cv=none; d=google.com; s=arc-20160816; b=FoGMPDKWyxIxIklqaAU4e/nRvN2RCADf2xnC7WrxUH4bSeAipCt7Re2OKqao0kgyEY VI2tnV1FviD59AUF6WXIo1qA6fH8zpu7NHdAHCvBg3vqFJJgOCNB3eGcbOv13qHOVRet OUuywZ9VL/BNMRn0H44dNdvKh3YMmEwHPDtXiJcmSz1860p2Ts28Xe11C25kI+4mdWaK zLEZjUrjfLNo3oimVhStTjXkHSu0fTIaL2RZ6U5k0XgjWte7IXb5X9QiK9q+hXwCGFb7 qZZfP1uLB5dMYzTKOEWP4dTbxtbuwn3Ht0YEwfGmJtLZREXya7kXIoue2oCJKU4Qd6E9 K1uA== 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:dkim-signature; bh=j2joXtoL181T0Q+21ODaRSamdDlvS5I215c8Di1fWVs=; b=rgxyRBkCmVi5r5GZxhJSz6lTBmCBbOnPb+wQSISiP7czgHQH4giUUHN5My4vlx7Y8r SX/ivkYM9ja9vh+3g7FgRLQUt9vTupaiHaijHTl3gfVAHm3pGHMBoT7SdPXRTfq1i1K5 1ubYASawoYdmQ2SiZn7hqBVbhAN0gvgQLCsh52drpFQeOj2M4U86T0CG7bSI7yF+Gj0j y0Q+jFA2dSLxo1HB3nS/8zREAphsqBTi0275pZy21R2qbQOPav2dWupzW6L9ICO0eU7h ffWita6j7R5acZZqFBvqQiCS+HAJ3AaegpiBvSJeRba7qcwZXs4CBz7oPlmGKyiG+pHZ 2Obw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=W98GuLgA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d16si7385014plj.104.2018.11.28.00.56.48; Wed, 28 Nov 2018 00:57:03 -0800 (PST) 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; dkim=pass header.i=@chromium.org header.s=google header.b=W98GuLgA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727736AbeK1T46 (ORCPT + 99 others); Wed, 28 Nov 2018 14:56:58 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:42879 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727382AbeK1T46 (ORCPT ); Wed, 28 Nov 2018 14:56:58 -0500 Received: by mail-pg1-f196.google.com with SMTP id d72so9189886pga.9 for ; Wed, 28 Nov 2018 00:56:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=j2joXtoL181T0Q+21ODaRSamdDlvS5I215c8Di1fWVs=; b=W98GuLgAcg0nB6qqCE3sDvPMTo73UFUgvoi7Y0+0FCPdnSGSRNoJ68DULJZyImO+Uk X3Ywz2WANNZrLW/ebqlF7Uiu9Ea3QddUHMsO78IZ4pBpfIyGloASm/iB4voVCSi+Q3aW AcYQN0ZqLef8yMV3oxXsNYKQDKRFSiDmUpMBg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=j2joXtoL181T0Q+21ODaRSamdDlvS5I215c8Di1fWVs=; b=D/Sou1ci5D9jurO5OqMrWmtpaiXiZseLIQ0bShyZqv9BIIufEvntofhE06nSFM4kWi yf/AsU7p+dP24XM+CK6SVID0+/m7lWy09XGkoWBA5sk86wv3Mu5mQDnies+Z0gOrSZJL lZ8sV1FZ4uUGczJBhqv0btFzyEKmLrdXxI9+d5xLlEl3s7VAuI28O4nGgLluJpjhhDKC NaGTXN06mOanIBLa0FQKuJ196wIDLmACAXJvxl2eElg4G9NyKhnq98tgffz5bNgfH0Lr T/I1qlPxmlbPDbhK8heVz8LzIMS2skkaQ/OT/v2JHBGM96mcirwY2xnaFj2VQsoUWLpS CYEg== X-Gm-Message-State: AGRZ1gIUGyotsI33S4OCXqSLuPS4G5fo3Ex+7xRPfM+454t2+HPUvWu5 vZAx0or/gCKkxrZCcGhVew0PyD2M1qOtlAxKGOQztw== X-Received: by 2002:a62:d0c1:: with SMTP id p184mr36225520pfg.245.1543395365831; Wed, 28 Nov 2018 00:56:05 -0800 (PST) MIME-Version: 1.0 References: <20181111090341.120786-1-drinkcat@chromium.org> <0100016737801f14-84f1265d-4577-4dcf-ad57-90dbc8e0a78f-000000@email.amazonses.com> <20181121213853.GL3065@bombadil.infradead.org> <20181122082336.GA2049@infradead.org> <555dd63a-0634-6a39-7abc-121e02273cb2@suse.cz> <20181126080213.GA17809@infradead.org> In-Reply-To: <20181126080213.GA17809@infradead.org> From: Nicolas Boichat Date: Wed, 28 Nov 2018 16:55:54 +0800 Message-ID: Subject: Re: [PATCH v2 0/3] iommu/io-pgtable-arm-v7s: Use DMA32 zone for page tables To: hch@infradead.org Cc: Vlastimil Babka , Robin Murphy , willy@infradead.org, Christoph Lameter , Levin Alexander , Mike Rapoport , Huaisheng Ye , Tomasz Figa , Will Deacon , lkml , Pekka Enberg , linux-mm@kvack.org, iommu@lists.linux-foundation.org, Michal Hocko , linux-arm Mailing List , David Rientjes , Matthias Brugger , yingjoe.chen@mediatek.com, Joonsoo Kim , Mel Gorman , Andrew Morton Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 26, 2018 at 4:02 PM Christoph Hellwig wrote: > > On Fri, Nov 23, 2018 at 01:23:41PM +0100, Vlastimil Babka wrote: > > Is this also true for caches created by kmem_cache_create(), that > > debugging options can result in not respecting the alignment passed to > > kmem_cache_create()? That would be rather bad, IMHO. > > That's what I understood in the discussion. If not it would make > our live simpler, but would need to be well document. From my experiment, adding `slub_debug` to command line does _not_ break the alignment of kmem_cache_alloc'ed objects. We do see an increase in slab_size (/sys/kernel/slab/io-pgtable_armv7s_l2/slab_size), from 1024 to 3072 (probably because slub needs to allocate space on each side for the red zone/padding, while keeping the alignment?) > Christoph can probably explain the alignment choices in slub. > > > > > > But I do agree with the sentiment of not wanting to spread GFP_DMA32 > > > futher into the slab allocator. > > > > I don't see a problem with GFP_DMA32 for custom caches. Generic > > kmalloc() would be worse, since it would have to create a new array of > > kmalloc caches. But that's already ruled out due to the alignment. > > True, purely slab probably isn't too bad.