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=-0.9 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham 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 1F79AC04A6B for ; Wed, 8 May 2019 19:53:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E2B0B2173B for ; Wed, 8 May 2019 19:53:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728529AbfEHTxF (ORCPT ); Wed, 8 May 2019 15:53:05 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:44207 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727048AbfEHTxF (ORCPT ); Wed, 8 May 2019 15:53:05 -0400 Received: by mail-qt1-f195.google.com with SMTP id f24so14272196qtk.11 for ; Wed, 08 May 2019 12:53:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=HCtX1frjqYU3uAHx2sJHA2OsRYk/uvM/1v6XS0m5Flc=; b=ADEmuipNeujkuWApCcflZM53ERZJUNjq7S6erToJGyItqj6wERwk7FFgGWKKBYva7h SG/e9pZtCDa50lRurRyHI2bAOfvYZbGmwNZlyoXwxD2kqfBbBeMt9RvVSvlbVVWaNeAY GFqTgDPK+Was0DWAJHf+Ow/UgnVAlqAEZ0LkoXUqZ2lwt9cF566vEO/zgIVv9UIf4u1P Nc9OSdJrWNdea+Y/fWS75JOrjh+nzAz3tOpb7PmvKRwh3bMhfYOpI11aiqYgT6oQLgHk lFLeq3w6H7CZ8T5S2ln6IMpeKOFAKFg0/ohZr7BtXj3yaz4DQ5ycKEGO9hH5X/WZn9lI /5fA== X-Gm-Message-State: APjAAAUoA6wcoxW4vCMaWOZCVug/hiGJ0ahPByup1eBtIntKsPfiS8Ek gDQpHs4w/d7CXiF1exfeoPO/6A== X-Google-Smtp-Source: APXvYqwIq+qQq7KlphUsKHG//ULb8acsh1YzsFVjn3RIncz2/sckcX3cNza0iJjt02Ns8Uoy45TFHg== X-Received: by 2002:aed:22ad:: with SMTP id p42mr6782261qtc.86.1557345184623; Wed, 08 May 2019 12:53:04 -0700 (PDT) Received: from vitty.brq.redhat.com ([64.251.121.244]) by smtp.gmail.com with ESMTPSA id g206sm9519349qkb.75.2019.05.08.12.53.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 May 2019 12:53:03 -0700 (PDT) From: Vitaly Kuznetsov To: Stephen Hemminger , "m.maya.nakamura" Cc: Michael Kelley , KY Srinivasan , Haiyang Zhang , "sashal\@kernel.org" , "x86\@kernel.org" , "linux-hyperv\@vger.kernel.org" , "linux-kernel\@vger.kernel.org" Subject: Re: [PATCH 2/6] x86: hv: hv_init.c: Replace alloc_page() with kmem_cache_alloc() In-Reply-To: References: <87wok8it8p.fsf@vitty.brq.redhat.com> <20190412072401.GA69620@maya190131.isni1t2eisqetojrdim5hhf1se.xx.internal.cloudapp.net> <87mukvfynk.fsf@vitty.brq.redhat.com> <20190508064559.GA54416@maya190131.isni1t2eisqetojrdim5hhf1se.xx.internal.cloudapp.net> <87mujxro70.fsf@vitty.brq.redhat.com> Date: Wed, 08 May 2019 15:53:03 -0400 Message-ID: <87bm0csoyo.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-hyperv-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hyperv@vger.kernel.org Stephen Hemminger writes: > I would worry that kmem_cache_alloc does not currently have same alignment constraints. > See discussion here: > https://lwn.net/SubscriberLink/787740/a886fe4ea6681322/ I think it even was me who reported this bug with XFS originally :-) Yes, plain kmalloc() doesn't give you alignment guarantees (it is very easy to prove, e.g. with CONFIG_KASAN), however, kmem_cache_create() (and dma_pool_create() to that matter) has explicit 'align' parameter and it is a bug if it is not respected. -- Vitaly