Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp387158imm; Mon, 21 May 2018 07:37:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoQMjJUMnSzhugVgueS+LhSqCrgmclp9/jd/XQeXHI4r22IZdQiVF4oxSytaEGJ4QSIYIcZ X-Received: by 2002:a17:902:6a89:: with SMTP id n9-v6mr20677339plk.41.1526913443698; Mon, 21 May 2018 07:37:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526913443; cv=none; d=google.com; s=arc-20160816; b=k6zYoxFfV1HxG6MNWXL0AjLdf9FeC3LjLhhwc9KNeEPqHRnl/ed0fz5T4CQcSy9a9u ZDDRxoARu0FIJzzaWwzTusf/Gr4RsROndsnKwJV8P1DVvxNU22yIbP/A32lX4LXmC5cq rgk2p59mOmEp+7ob+PrlCzFBmuYW/UzJS4WV37aVNXCkRbBA4WEZvc5duKenfUeZnzzG JQsdRHPnZXcoYYW26rAocFcplDSHvZR3ohZ1VuMu7ezrHEWzfo+N5J9jmDMpTH9cq1bz +kgUbmS/55MD2cHu/JKakXH78TxhRrJ5LFAExYdtpyzgSl1pMB/pysDEUqAg7aA6OGGe yk+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=99QP19G3hr2PKdIbN5KRQGuh9KIqDW+oi30B/Tknu4M=; b=C1k+SyQnuMx5Az+mOuBWRZ7uLJTJuUJXbLQnWxoGuCpA4zQ9A611i4YdbuoYMQPovJ vIWNOqougdNdNUQFdcy0KKZgClN4W32aB6fEYQVOKJIBKTKftwX+s+aEyytqpWaVkesc mqtPkXJX/ZCByHviyK4ssViXZqBxHAzaFfuJjegZNsGo1n9z6iXAQIE0PpTIOJPIXkm4 IRfdh5WnQVnsPmntY6RkukjUbexYDngkNBVXAVs0ai7iTJA+YXO75Zllk6MvXN/xvY4z uIXzQuibf8/AH5tBY6Qcn+GRgycDKmhEdafvDKRJxgorSCtGCLsgzsuNHdF8q1MdBQOk u1wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=qVu9gKdL; 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 p13-v6si10673475pgv.182.2018.05.21.07.37.08; Mon, 21 May 2018 07:37:23 -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=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=qVu9gKdL; 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 S1752731AbeEUOgx (ORCPT + 99 others); Mon, 21 May 2018 10:36:53 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:45755 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752231AbeEUOgu (ORCPT ); Mon, 21 May 2018 10:36:50 -0400 Received: by mail-io0-f193.google.com with SMTP id c9-v6so14545268iob.12 for ; Mon, 21 May 2018 07:36:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=99QP19G3hr2PKdIbN5KRQGuh9KIqDW+oi30B/Tknu4M=; b=qVu9gKdLEdj4o7ZlXTT7uL4n/6rcKLHxgAiReqVEGn4axdKYL8di1TW/e2CY78jpl9 tFO4Y1MHY72L9r98ewEMR64+OUXeTvwlfSksWvhdzRy4MDsySI5rjf4aFUXNzH3IHCWi C+AgB8unVVf4GsTDrv7TAMtPd/gW2SsyeQy452O/fMrkaBOllWAjVL0XLLKRlp4XozGw K2mZBIY/V4pD2iNs5l3JgXBllFURaqXhNwLu8a6BO8Tc4q6iR8ImiCUlRHbT/hU3Owz3 OXjcH+Im5Nv41/gIJi5z0MforJMnfG+cGP5T6V8NGvgQ+6cEOgvKpawIqrUKgnlqjIBi Sxeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=99QP19G3hr2PKdIbN5KRQGuh9KIqDW+oi30B/Tknu4M=; b=DrjScNhyBTBiGP2cT4wDE0jhV2lcvJXIhc8TlmEmYcKI5sLHJsxvy74c3gZ0iyTOrR N4QkhwiMWz8joBk8xam6Vo1TUaiZ2rUV9Me8z4/wPtsdaFrNo5metonySIv7D0VQmkCW /+SOr2Aug+FtgnxKgY69Gqadz+4zzSG7wgauW36u/8Mbx/XTx1L7U0CxK5023mOx5dgH CFIVu8Lckr1LKSQ6yioYF4oj0zvfs/nI41Z/8QGK6waIkIOXum1uz8cfSEr5rcva7PnJ BA2vG4hA+lxnl8Ru0D8vLAa8usN2qFFnZAtY4D2ZL9qdtlMKNCPsiNuGLaxItdk6O0La TB1w== X-Gm-Message-State: ALKqPwdEKFwzfvelJwidyiD9VDyAY+cD1Vwv8EmAnH+pnLDWEEcQxUKS 1kr8PY4XgTR8dlrLYfgXpcy5Pg== X-Received: by 2002:a6b:264d:: with SMTP id m74-v6mr21485146iom.154.1526913409348; Mon, 21 May 2018 07:36:49 -0700 (PDT) Received: from [192.168.1.167] ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id y23-v6sm7878835iol.63.2018.05.21.07.36.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 May 2018 07:36:48 -0700 (PDT) Subject: Re: [PATCH 00/13] convert block layer to bioset_init()/mempool_init() To: Mike Snitzer Cc: Kent Overstreet , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, hch@infradead.org, colyli@suse.de, darrick.wong@oracle.com, clm@fb.com, bacik@fb.com, linux-xfs@vger.kernel.org, drbd-dev@lists.linbit.com, linux-btrfs@vger.kernel.org, linux-raid@vger.kernel.org, neilb@suse.com References: <20180520222558.7053-1-kent.overstreet@gmail.com> <20180521140348.GA19069@redhat.com> <686d7df6-c7d1-48a6-b7ff-48dc8aff6a62@kernel.dk> <20180521143132.GB19194@redhat.com> From: Jens Axboe Message-ID: <2bbeeb1a-8b99-b06a-eb9b-eb8523c16460@kernel.dk> Date: Mon, 21 May 2018 08:36:46 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20180521143132.GB19194@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/21/18 8:31 AM, Mike Snitzer wrote: > On Mon, May 21 2018 at 10:19am -0400, > Jens Axboe wrote: > >> On 5/21/18 8:03 AM, Mike Snitzer wrote: >>> On Sun, May 20 2018 at 6:25pm -0400, >>> Kent Overstreet wrote: >>> >>>> Jens - this series does the rest of the conversions that Christoph wanted, and >>>> drops bioset_create(). >>>> >>>> Only lightly tested, but the changes are pretty mechanical. Based on your >>>> for-next tree. >>> >>> By switching 'mempool_t *' to 'mempool_t' and 'bio_set *' to 'bio_set' >>> you've altered the alignment of members in data structures. So I'll >>> need to audit all the data structures you've modified in DM. >>> >>> Could we get the backstory on _why_ you're making this change? >>> Would go a long way to helping me appreciate why this is a good use of >>> anyone's time. >> >> Yeah, it's in the first series, it gets rid of a pointer indirection. > > "Allows mempools to be embedded in other structs, getting rid of a > pointer indirection from allocation fastpaths." > > So this is about using contiguous memory or avoiding partial allocation > failure? Or both? > > Or more to it? Just trying to fully appreciate the theory behind the > perceived associated benefit. It's about avoiding a pointer indirection. Instead of having to follow a pointer to get to that struct, it's simple offset math off your main structure. > I do think the increased risk of these embedded bio_set and mempool_t > themselves crossing cachelines, or struct members that follow them doing > so, really detracts from these types of changes. Definitely something to look out for, though most of them should be per-dev structures and not in-flight structures. That makes it a bit less sensitive. But can't hurt to audit the layouts and adjust if necessary. This is why it's posted for review :-) -- Jens Axboe