Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3599752imm; Thu, 17 May 2018 11:18:48 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo6y09fV61HVDY1rL3IfGdExRvecVPf0Xs9XeilUxiGWrwhHN9UK4GojwOLxAuWAUb0IPtl X-Received: by 2002:a62:b509:: with SMTP id y9-v6mr5703339pfe.121.1526581127984; Thu, 17 May 2018 11:18:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526581127; cv=none; d=google.com; s=arc-20160816; b=0ephznxv9QVcyqMHRdsr4S89QmB8LIL1ytnIr2Xz7A/KcPRo6P4RsralcMjAgxYzYb b50OaR8tPuT16ogpJZHsfmpO5X3WfuA7a6lAjVA+jlkO2UPSbulbJpZwpW2eLL3Jip+j JzB6GwZ6R7tL8/WBdjfb6GpyJ+OqJwpEJ+/nyl52h7A6sb7SS4FQ8rNu28x+11Dl5JWH r/2c+ynS8v813MGWZyDgrCBlFXq+zhxGIznJgjzYf9ZukeQtk+PFPwWS7v1cZwa62DgT nBB0/Zxh7lR2IgpxfXkiJY2IVh+U0EFEmfp7B0Mt6YrnpI0fV1IvorI5ECmQFqDAVMK7 kYcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=jBtUtXtlyaRJHKMA501oxX4ICafS89OWg5qLMrxSC4s=; b=pmNeTY8NO8BzY5Z/SiPDDAuG9GUhi+W1+on9TRlGL6vqo2n/H97G4hpIfTjWWwFicK 3TQ8bWR8dfeZV8HYUoxtDiEDIJTV90Pch4cgJvJ1igsLVn7zK/SQ+/uIs1OBSxJuOEEm 6PUl270ZqpkmOHCzP0dg7Zaa1z9Azu7ZX4Hvx3YPvUKHN701Yzzflqm8uQSaipdQsr7Q Sjg8cqYMSkwi+gB2hH+I9jzP/Up08ZteDdVs4H5nKpp33GDTQL1mVyN6Wyq89HlGnvHu JzUK8s2zH8PFitwK7bX6CkZirOjNVB+aoaIR/x9fYj2nK2Ua9Z7PZV/mTlZ58e1yvGQ1 GOAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@infradead.org header.s=bombadil.20170209 header.b=TATK2hSD; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10-v6si5640053plo.150.2018.05.17.11.18.31; Thu, 17 May 2018 11:18:47 -0700 (PDT) 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=neutral (body hash did not verify) header.i=@infradead.org header.s=bombadil.20170209 header.b=TATK2hSD; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752002AbeEQSSS (ORCPT + 99 others); Thu, 17 May 2018 14:18:18 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:44518 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751880AbeEQSSR (ORCPT ); Thu, 17 May 2018 14:18:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=BjJqmoxAYVc5HQOmtUut0G9rm0BWKX4kP0s3OYSG6Mk=; b=TATK2hSDnQg03AApYhMC97Sk2 bemHdx86E7I3TCRjGc9FFM0V/nuzGrYosHmG/0AUk3c/7cQYos/Wl4GaIcrIwnwuhvQc3LHuP3SxV fXSRJPEiM6zH0WHfbGzDWKMgUr+nSUFS5Mc3Is99qUYAXhjk+zBKKpqJ27vpRwhbehJr85ddSS+YT gHB4fhSb4eMCp7D/+rKADn8dzvb5jyqgco9AaTMl3N3PSs8KoQpYKOyZWcSkGV6PLDg0FTOXfNADf u+OvVvVmEuGN3H6nzCH8fEQE9B0a2wxBBZA3XOm0a4/95RDIJX3BLf6bqI26XBzzmpt6C+QQNXods iLVJiPk4w==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJNTj-00006b-Nd; Thu, 17 May 2018 18:18:15 +0000 Date: Thu, 17 May 2018 11:18:15 -0700 From: Matthew Wilcox To: Sinan Kaya Cc: linux-mm@kvack.org, timur@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, open list Subject: Re: [PATCH] mm/dmapool: localize page allocations Message-ID: <20180517181815.GC26718@bombadil.infradead.org> References: <1526578581-7658-1-git-send-email-okaya@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1526578581-7658-1-git-send-email-okaya@codeaurora.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 17, 2018 at 01:36:19PM -0400, Sinan Kaya wrote: > Try to keep the pool closer to the device's NUMA node by changing kmalloc() > to kmalloc_node() and devres_alloc() to devres_alloc_node(). Have you measured any performance gains by doing this? The thing is that these allocations are for the metadata about the page, and the page is going to be used by CPUs in every node. So it's not clear to me that allocating it on the node nearest to the device is going to be any sort of a win. > @@ -504,7 +504,8 @@ struct dma_pool *dmam_pool_create(const char *name, struct device *dev, > { > struct dma_pool **ptr, *pool; > > - ptr = devres_alloc(dmam_pool_release, sizeof(*ptr), GFP_KERNEL); > + ptr = devres_alloc_node(dmam_pool_release, sizeof(*ptr), GFP_KERNEL, > + dev_to_node(dev)); > if (!ptr) > return NULL; ... are we really calling devres_alloc() for sizeof(void *)? That's sad.