Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752882AbdLEPlS (ORCPT ); Tue, 5 Dec 2017 10:41:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55430 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752515AbdLEPlQ (ORCPT ); Tue, 5 Dec 2017 10:41:16 -0500 From: Jeff Moyer To: Kirill Tkhai Cc: Tejun Heo , axboe@kernel.dk, bcrl@kvack.org, viro@zeniv.linux.org.uk, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-aio@kvack.org, oleg@redhat.com Subject: Re: [PATCH 0/5] blkcg: Limit maximum number of aio requests available for cgroup References: <151240305010.10164.15584502480037205018.stgit@localhost.localdomain> <20171204200756.GC2421075@devbig577.frc2.facebook.com> <17b22d53-ad3d-1ba8-854f-fc2a43d86c44@virtuozzo.com> <20171204215234.GN2421075@devbig577.frc2.facebook.com> <6eaa11a6-a087-42ab-df65-9142b59bf726@virtuozzo.com> <707ca8fa-aee1-f068-b8ab-de5004d3d7ac@virtuozzo.com> X-PGP-KeyID: 1F78E1B4 X-PGP-CertKey: F6FE 280D 8293 F72C 65FD 5A58 1FF8 A7CA 1F78 E1B4 X-PCLoadLetter: What the f**k does that mean? Date: Tue, 05 Dec 2017 10:41:11 -0500 In-Reply-To: <707ca8fa-aee1-f068-b8ab-de5004d3d7ac@virtuozzo.com> (Kirill Tkhai's message of "Tue, 5 Dec 2017 02:14:54 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 05 Dec 2017 15:41:16 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 481 Lines: 16 Kirill Tkhai writes: >> I think you just need to account the completion ring. > > A request of struct aio_kiocb type consumes much more memory, than > struct io_event does. Shouldn't we account it too? Not in my opinion. The completion ring is the part that gets pinned for long periods of time. Just be sure to document this where appropriate. Users/admins should know that the aio completion ring now contributes to their memory budget. Cheers, Jeff