Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4619767imm; Wed, 30 May 2018 08:50:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIFvZXhSEIzU4MgahYF6RwYBnjeIhR3NPfLAIlvQp9ZY/fks/YqenJOMQLmZlynKzqmsWp7 X-Received: by 2002:a17:902:988b:: with SMTP id s11-v6mr3380799plp.304.1527695441644; Wed, 30 May 2018 08:50:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527695441; cv=none; d=google.com; s=arc-20160816; b=0U4NiuwbSG3ZxT00oU4JtmjEQXwtjmnFQRPOBJt7UFT3IZcWDo5lZbqzExO8L4VUT6 pzgjjrBElAY1YxqWL9qR+SebrLwxcJxX7ZppUKMj+UPU+YQV3544GQpbWRjaxC3pslA1 U2/0FvVWEjajfUSSM2WU40J7mZvF0qImSjTF6SymsFs9yoK8bk4wrsKSRj3denPm9cw2 n/EKBU3TANGEJnNJlMLBuvoiPNSyD2bb2VOgkiX0/ikGSxPIzxcUFMysOsb4xXvdfQAq Ua6XUX3ootya7bP/gyBFP9vu+pytNsdifoGuVKJ8+4iu8lnq4WggnH95stTFfV8ZJUp4 qU8Q== 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=iCKH5GPxuGtvQjSoWMtxRU4KsHuIp1HyStr0UpERAO0=; b=S8VjkdNAIZYCMg5Zndl38kl5DNdgDw0wCKOF4zbNGaiujEXGYYKiINtiv8rdgM81tC EGarpBBAQqlFa/UK8kwzgtc9jd66qGT21vfrOw3Dz3kw53f14C9lKZ8122JzJuQYU8SX V5vtRzIVtLnWeyTRpZbswsL5ydyqLyD5OskEv134ViYB896q5mQJAZWSx5doCo9KlWcT e43+eH1xh496i+iQLKqZuk3CqILm+kxLaUyZ17lexy4yc5wmzYDALZaw/C8J2J0OHIId a40YLOSUVt8uP5hS/MxhjaPxJ85pvkA+v+gDl2blH08DLI532O3UXQGO6sIjlJ5svMjQ D0Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=pRtwQPJt; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 2-v6si35762925pfk.287.2018.05.30.08.50.27; Wed, 30 May 2018 08:50:41 -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=fail header.i=@gmail.com header.s=20161025 header.b=pRtwQPJt; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932104AbeE3Ptj (ORCPT + 99 others); Wed, 30 May 2018 11:49:39 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:36105 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753150AbeE3Pth (ORCPT ); Wed, 30 May 2018 11:49:37 -0400 Received: by mail-yw0-f193.google.com with SMTP id v68-v6so6162473ywd.3; Wed, 30 May 2018 08:49:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=iCKH5GPxuGtvQjSoWMtxRU4KsHuIp1HyStr0UpERAO0=; b=pRtwQPJtYc/KyIB57XSMdcLTxb8IHTRdHzSCTwi9ia4xC9ERYEVSbiKLHrJMAxunV9 8g34+u2eYsMP4AF9CKiFMxjGT2KnU7LWm9P9Wu7d9JSFjLfy01FOBRmqnr+cNyds7LHO PaU/L8KkksJYfsw0VkV1+XBG9ErLpMzbCvL5D4ICoC/KzhoWpjlADG/2S1eJ6A0J9rHo 5r32g5GvCp0lKj0u9LxxaYmzlz/MIXS0NjED4bAGCzqL5xwKdVFUk7clxA2vzejbbWzN 5Igsdv7N7MrKv2Bu2rWNmU+vHAfoZo5N3eKASei6j2/G1pEdlTCcdIYeWOqJWYJUjLx+ 5b+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=iCKH5GPxuGtvQjSoWMtxRU4KsHuIp1HyStr0UpERAO0=; b=Qn/6IFV2qJGneJr80wzxabEE2FM6chDDwT+Q7Rhzr62GpuIlRi7P52Fs2jXaNQybw3 67Qi7K2VioZcTGHGpstqfesKlDK/M7xGVjPaDBjjqeI29Wua7cmL0UQh9NpxJHgAsVOP MwRCC4sHMMI5PdcyMGAfkKeS4qzWe+5hw58Y3ValPwAjZhml8OixX1q/zeX/2A1ILtVv MN5hMMiHbSjIoccosowpU4Avrur85gh4ijO58nu+YXzPrmlpnTzmTW/sdQGXKELZcK63 DKvGE+AbaV28A6F57nOH8vMNlrHtODLdIbTBRIrPgrA1cZHRhw6N6wVJyQs8Iz25yAN8 ADkg== X-Gm-Message-State: ALKqPwfPzpTLHFfGUE6BMUgj2kN+Faob4ZKUFP3RrgiR2tRK5b2+XR23 TCU0CAg3LQ1dLCi0kq1G5sg= X-Received: by 2002:a81:4409:: with SMTP id r9-v6mr1704407ywa.84.1527695376718; Wed, 30 May 2018 08:49:36 -0700 (PDT) Received: from localhost ([2620:10d:c091:180::1:6002]) by smtp.gmail.com with ESMTPSA id i124-v6sm14581989ywd.45.2018.05.30.08.49.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 May 2018 08:49:35 -0700 (PDT) Date: Wed, 30 May 2018 08:49:33 -0700 From: Tejun Heo To: Josef Bacik Cc: axboe@kernel.dk, kernel-team@fb.com, linux-block@vger.kernel.org, akpm@linux-foundation.org, linux-mm@kvack.org, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Josef Bacik Subject: Re: [PATCH 01/13] block: add bi_blkg to the bio for cgroups Message-ID: <20180530154933.GI1351649@devbig577.frc2.facebook.com> References: <20180529211724.4531-1-josef@toxicpanda.com> <20180529211724.4531-2-josef@toxicpanda.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180529211724.4531-2-josef@toxicpanda.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 29, 2018 at 05:17:12PM -0400, Josef Bacik wrote: > From: Josef Bacik > > Currently io.low uses a bi_cg_private to stash its private data for the > blkg, however other blkcg policies may want to use this as well. Since > we can get the private data out of the blkg, move this to bi_blkg in the > bio and make it generic, then we can use bio_associate_blkg() to attach > the blkg to the bio. > > Theoretically we could simply replace the bi_css with this since we can > get to all the same information from the blkg, however you have to > lookup the blkg, so for example wbc_init_bio() would have to lookup and > possibly allocate the blkg for the css it was trying to attach to the > bio. This could be problematic and result in us either not attaching > the css at all to the bio, or falling back to the root blkcg if we are > unable to allocate the corresponding blkg. > > So for now do this, and in the future if possible we could just replace > the bi_css with bi_blkg and update the helpers to do the correct > translation. > > Signed-off-by: Josef Bacik Acked-by: Tejun Heo Thanks. -- tejun