Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4284204pxv; Tue, 29 Jun 2021 03:27:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8IVmjPwk5ebcOgWAKcb/cU6CfcwrO5OLyTOV0GGA3kRxA5+S0dKLOPkW202yMzzXN1iY1 X-Received: by 2002:aa7:d955:: with SMTP id l21mr39791839eds.35.1624962475827; Tue, 29 Jun 2021 03:27:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624962475; cv=none; d=google.com; s=arc-20160816; b=kwXs8zv7DOtV1xBF7xkORIrF2/IFanZuQRNKvRJs1PFZ+xT+oZb0tV5txHlQhQ57+E JhYOo5Olp062gCTBnbs+zWL0l4z77hz6Co0xoqQmtKD0ETpKVRJYBeHNCxrcXN5OSf1w ZBb4rJNtBJeUl8MsSXxAHldVCRwlQ6P36S2ikBEkPkKtiOBVFhV8wuN1Tk7PgkGzawZR VC85dp7mVzV5wrrfR1Dm5ISzEvS151va5oXqc6seFI7Ob7IOa+OK/vds/9i2ZjOvmcJL 8QIVgpIyttms+OYPFVEOYsy16j6/+48mWQgSWZxdV2tNR18m9Fuk0psAxhB+4DcCeAmv i20Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=4nnJd/WQSpUTtWERcTYMKjk7Xm3bTS7VSG5SjPdv9Bc=; b=lkly7n0tvDKRdZgsYC7ARkWAHK4uQeopS/wYLbPS+HwSQUzS5P/oSM5J0sKGcdtChV aBCQ3UgPMWP1QbtpVeb125c+VSBd3M1+fvqNFuqiS+15PWcD+c0Qs9ixpE7RYm+0pN53 klG5LEfBhL4EVvWZf3a6aZl2/+m5L2lsrFMEb7gbwMaYFqXhNMbXjzk5ibghOzjCBYfM 1VLOVKOk67Wtqi3WiaTdegIqKts/FLUl1ZDhnUNmJwZ2mImFRq50xrm/O3PeNiFf0gEq nMivvBadudvn2EBP8ppQhK5SvB28WhvF+iUe8Uw4A9Dhgox+PD+A20dDfja0hdHDkenE hVrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=SIOiyfS7; dkim=pass header.i=@suse.com header.s=susede1 header.b=SIOiyfS7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de45si16429047ejc.521.2021.06.29.03.27.32; Tue, 29 Jun 2021 03:27:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=SIOiyfS7; dkim=pass header.i=@suse.com header.s=susede1 header.b=SIOiyfS7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232915AbhF2K2v (ORCPT + 99 others); Tue, 29 Jun 2021 06:28:51 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:60660 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232772AbhF2K2v (ORCPT ); Tue, 29 Jun 2021 06:28:51 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 8F0B9203CD; Tue, 29 Jun 2021 10:26:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1624962382; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4nnJd/WQSpUTtWERcTYMKjk7Xm3bTS7VSG5SjPdv9Bc=; b=SIOiyfS7XfAvoPmQiyHYe5i2CqhxV09toMQQiEzN+oosnPqqz8XsULnowsgVFUZwJqTTwP GUzX0vNQaS1ETRJIiLWMUmwhOELlrPWsRhQL2Zvfmw1QaOY5z3ckCm/xaKpIfv9AaWwOgM LUKvYk0acBAFboy9Nt9XSeD/pPvh0Qk= Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 5572711906; Tue, 29 Jun 2021 10:26:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1624962382; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4nnJd/WQSpUTtWERcTYMKjk7Xm3bTS7VSG5SjPdv9Bc=; b=SIOiyfS7XfAvoPmQiyHYe5i2CqhxV09toMQQiEzN+oosnPqqz8XsULnowsgVFUZwJqTTwP GUzX0vNQaS1ETRJIiLWMUmwhOELlrPWsRhQL2Zvfmw1QaOY5z3ckCm/xaKpIfv9AaWwOgM LUKvYk0acBAFboy9Nt9XSeD/pPvh0Qk= Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id G6qnE0712mDMAwAALh3uQQ (envelope-from ); Tue, 29 Jun 2021 10:26:22 +0000 Date: Tue, 29 Jun 2021 12:26:21 +0200 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Dan Schatzberg Cc: Andrew Morton , "open list:BLOCK LAYER" , open list , "open list:CONTROL GROUP (CGROUP)" , "open list:MEMORY MANAGEMENT" , Johannes Weiner , Jens Axboe Subject: Re: [PATCH 3/3] loop: Charge i/o to mem and blk cg Message-ID: References: <20210610173944.1203706-1-schatzberg.dan@gmail.com> <20210610173944.1203706-4-schatzberg.dan@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8xak29pAuRs/xS4S" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --8xak29pAuRs/xS4S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jun 28, 2021 at 10:17:18AM -0400, Dan Schatzberg wrote: > Agreed that exporting int_active_memcg is an implementation detail, > but would this prevent set_active_memcg from being inlined? Non-inlining in the loop module doesn't seem like a big trouble. OTOH, other callers may be more sensitive and would need to rely on inlining. I can't currently think of a nice way to have both the exported and the exlicitly inlined variant at once. It seems it's either API or perf craft in the end but both are uncertain, so I guess the current approach is fine in the end. > Yes it is intentional. All requests (not just aio) go through the loop > worker which grabs the blkcg reference in loop_queue_work() on > construction. So I believe grabbing a reference per request is > unnecessary. Isn't there a window without the reference between loop_queue_rq and loop_queue_work? I don't know, you seem to know better, so I'd suggest dropping a comment line into the code explaining this. Thanks, Michal --8xak29pAuRs/xS4S Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEEoQaUCWq8F2Id1tNia1+riC5qSgFAmDa9UkACgkQia1+riC5 qShOvQ/+IAbayEL5mDzde7avlf2IctIAGpgzfJMiT0f2HjZlZvc+wZyRZtbY48+f qQvyKrqzoa8urrykaJOPImzej1n5/+LPnxg/EdPXMLf3GP69aeRWx/UFSkiPpCeJ jw5r2FbQE29yfQYAtuHbL6IPnfa1JDkQXroHwN+MIsNqayGiz2FbE4fxPJxR8hkt xCYjCyNMzBEw1b334gUvj8XrFRbzfgIJokZ3UNVIrRcv/rbYKs4LplelQ5dGEjpp uzFAC5QDabn78+SJ6c7h5ReTx4zdPC+9A3FlZXBWxkpSPiPEPO6b0Qdo86p4v4eA MGT8fNcfyvjQZdzckZ1oHylUCBbDhCIons6PmEqpEDd5ZFA5taD9G6YRGyH1G7Kb EieXPoCynJWRCdHat3PeqTpnf9oYPsaiBXozn2UXdK2Rvv2+g9A5am/AKN+I2Y+J xgzp9FPA5nRx5Z8oIAl9iqvb8mfrlYPn0CsNnzo+eHE13Zh7nxlFQrrqJsnjaQ2J 45wPm24rg9XrKoTIpLs0O1INWqNjkweqPRLs5I/ClXRWkqXkfJ5cUchEjsLqksVJ SunkIX+LxIWE/Fb23d2jio51pC26W4gcAtOTTe6MZ/Iqq7LI7cpKX9bGW1dkrKgB nWkJth7TDCL8bIeOjDMMsNVW05el1qQcPei4GZ4sfBjJu6FlikM= =q9SM -----END PGP SIGNATURE----- --8xak29pAuRs/xS4S--