Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10504367imu; Thu, 6 Dec 2018 02:11:14 -0800 (PST) X-Google-Smtp-Source: AFSGD/XDO7oumi1M+1fpFKoCMQI2M3hj15K8HhzI7fNHArm+KnLGPofhQrdj2Eo4d8GCGsYry3EK X-Received: by 2002:a17:902:4464:: with SMTP id k91mr28065839pld.13.1544091074802; Thu, 06 Dec 2018 02:11:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544091074; cv=none; d=google.com; s=arc-20160816; b=VTdc9t84QCOm3KHNGJmuk+ej2Y2x8yY9aq/XIs9t0drQWV7lhPXQFqPK+4ROjwuo3a zE/ww4lx7Wkq9+6WZKavEzBeX4WT9k5OpJbP/0+Qg/WSYeZvon9qSXHHJmRxTK2Tcd++ deSW3j2oa7itg4XfKI37NBcrc3Ijn0J2OfCiN3jUOgPxV6zrpl3K9ITYAAp6IowWJ3iv 1DpOngR3m5WSZvBEVGMyfquc3bp8aqJ++FLhMXc8rRwBUjWl6UrYiZvAwDaxqjZzinnG 158WWO9EBe5uOMdw2M16f8xAebQYsw+S76o3rCMZm/EwITd4My1osKYSDE+D4h3DZSQh kcbA== 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=kAZFAsMe6hZyGv5RzFXOQY01K5owXwcpa6Gj4RdYfLU=; b=J/n/2hVOCRFYMalyNqf+biW9XcIhArRaHAq28B9UaGqTXmi3LEpDoux4LDxfA5WVwc fW1PRnOZ9vgc5K52lUQ3IIhGnHgTAvzp3WhZhSBT7TrvcP/RKvoL0qtvAdtVvcZfCls4 /gne4K27JkZLUwAMH69/fD+QS1jfp9KXJ9bIhOw8R74Gux8xL30Xxk8S7u2LewDm4sRt mH/QkzI902PT5AamsV0mMRIGBOglHu/uuVXFl0sS7BjOtGlKD0xZ1YlEN/+frWCZyE09 2DHIqLsNnWcIrT2UjWwlWGcQmpX4N/ZwU16CfBYk6/c0O8uExXYCFcGLBNu6fP8wiWK9 rXgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=A2mlhkbX; 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 t69si21081351pgb.365.2018.12.06.02.10.58; Thu, 06 Dec 2018 02:11:14 -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=A2mlhkbX; 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 S1729435AbeLFKJw (ORCPT + 99 others); Thu, 6 Dec 2018 05:09:52 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:35536 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727575AbeLFKJv (ORCPT ); Thu, 6 Dec 2018 05:09:51 -0500 Received: by mail-pl1-f194.google.com with SMTP id p8so11569720plo.2 for ; Thu, 06 Dec 2018 02:09:51 -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=kAZFAsMe6hZyGv5RzFXOQY01K5owXwcpa6Gj4RdYfLU=; b=A2mlhkbXkZpjgEqBQ4YZbuwMAkvlehsRCIJxTI4iYiC7c3WzDU7YIuPN1ycIh139sG Qu0+cHE1dO3bTwd+nGj0d/2zo1pZbuo1B6Bkvi3mp9MSml+d3wgsbbGJyG9t0mqcyHpV uae8CJ1VoR4cn2g8bJdsBtQzeobY0KSnxdww4= 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=kAZFAsMe6hZyGv5RzFXOQY01K5owXwcpa6Gj4RdYfLU=; b=gmrzifR1QOylFyw76Qg9aHnYRDyGgDVfOVrEx0k27Tr2WnhWowEjUuLt3Q2buYiwkZ m1SJjMps8r5QMOshnjS0H8AUo4FRoaiGgOkoF0yrM9F5yeJ+hE9N+SrPFzUBVnMEW2iZ ZmO5+RpOl7hdZhWi/gpV3kJ9UCZtV66FRNO/BOpi1xidgunI0dJtK7vXykSpOvggb8BU slKcIK9PuYSusMwgq/SCKLp3vJ76+2qvNalOfPikUkMl1xiujKv/RY6k1fEZulFm1dxV TDdzHx4woKpvR/dRzSBsJxqh5M3ih4KE9MlKoJi1LC36ouswphhQKYXmpVYPSnqoAhds pizQ== X-Gm-Message-State: AA+aEWbrOoPcc7m/uvEeX8ymrC4oG0aHnjZ4oYJL2tnRoXPymshWrZBx AsvsiudG3IdopfI1kASS6FCZOS3hzpL9UVYr9GH1BQ== X-Received: by 2002:a17:902:b68d:: with SMTP id c13mr27666751pls.102.1544090990437; Thu, 06 Dec 2018 02:09:50 -0800 (PST) MIME-Version: 1.0 References: <20181205054828.183476-1-drinkcat@chromium.org> <20181205054828.183476-3-drinkcat@chromium.org> <5eddd264-5527-a98e-fc8b-31ea89f474db@suse.cz> <09f56edb-2dab-c023-2164-dd7b5cef6afb@suse.cz> In-Reply-To: <09f56edb-2dab-c023-2164-dd7b5cef6afb@suse.cz> From: Nicolas Boichat Date: Thu, 6 Dec 2018 18:09:39 +0800 Message-ID: Subject: Re: [PATCH v4 2/3] mm: Add support for kmem caches in DMA32 zone To: Vlastimil Babka Cc: Will Deacon , Robin Murphy , Joerg Roedel , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , Michal Hocko , Mel Gorman , Levin Alexander , Huaisheng Ye , Mike Rapoport , linux-arm Mailing List , iommu@lists.linux-foundation.org, lkml , linux-mm@kvack.org, Yong Wu , Matthias Brugger , Tomasz Figa , yingjoe.chen@mediatek.com, hch@infradead.org, Matthew Wilcox 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 Thu, Dec 6, 2018 at 5:37 PM Vlastimil Babka wrote: > > On 12/6/18 4:49 AM, Nicolas Boichat wrote: > >> So it would be fine even unchanged. The check would anyway need some > >> more love to catch the same with __GFP_DMA to be consistent and cover > >> all corner cases. > > Yes, the test is not complete. If we really wanted this to be > > accurate, we'd need to check that GFP_* exactly matches SLAB_CACHE_*. > > > > The only problem with dropping this is test that we should restore > > GFP_DMA32 warning/errors somewhere else (as Christopher pointed out > > here: https://lkml.org/lkml/2018/11/22/430), especially for kmalloc > > case. > > I meant just dropping that patch hunk, not the whole test. Then the test > stays as it is and will keep warning anyone calling kmalloc(GFP_DMA32). > It would also warn anyone calling kmem_cache_alloc(GFP_DMA32) on > SLAB_CACHE_DMA32 cache, but since the gfp can be just dropped, and you > as the only user of this so far will do that, it's fine? I missed your point, this would work fine indeed. Thanks. > > Maybe this can be done in kmalloc_slab.