Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1311228rwb; Wed, 16 Nov 2022 15:40:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf53BQtc34ezEcuyu1tlXdYrpKQVqVCDc9Ar7L4b9b1+I54UQ8hmDXdVO4uCA+L2uj9cAMFV X-Received: by 2002:a17:906:a387:b0:78d:946e:f65d with SMTP id k7-20020a170906a38700b0078d946ef65dmr97456ejz.365.1668642047670; Wed, 16 Nov 2022 15:40:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668642047; cv=none; d=google.com; s=arc-20160816; b=if3F+uAsDHhDQM2hGl+uXaZiOb3CR8uFbBuVtS9t/uEfDss9ZODmaetWEyz8yNtIGF lSTd8oyp97S5CCPvpUL2UcwC+euDUbt9VwR31SMIDsNOZpDX9XUzrvq6l7o5LdRHwQYd eRPK7xR9m/NnGrRwztHonVGWVAntFGjTsK53Uz3q6ty5nAtQrWDde5aF5ua8mez5WR0Q QSh7RQGjhtLx1ZQzRaylzV3O0x90OUH8wR0S65ozF03CxIz8nzC8qiY7iRM9rF3RxjkR 3g8Df1r8wydvRKh3O0Hc+NQGfYYDrhMOHLMX+BgDgn7/3PxiVQ0HBKep5WMK70IaKg2/ +pxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=fWNz/QE0hFws1BC7T/rZzODjo9Sug+sYTjrv+WWI+bk=; b=uQh9Q8YJy+58IruS8s/07wtGmt/fll7cOhIOu9a/T80ncKsgBi2HsgdEUZSSGMqQGH CXDybA8ze2c2jv4l+6MDEwOu1Q1Lt4yAZvnThHXCIYIy/RtVx+WFfA0pxRornshdv6wv LQuatRDKl10ZVmxq5l36HM6Gv1SeUcqB3sDTH66CNm1xNULmFvfHRJgjxuJr/62OpCtK yeHVZhRE8QWxm/O5F98YRSZao8bH9WE7jP3qZM1q7ADEw3wL7p+JotgYOYpP05sbS/tJ sxb8APnV5aOkwaxTaOvCSsSQRHoOpHdfaLJ3EjVkz8z5Yd3kL/3AMPeSjzAOABIn2H8x /Fzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Vcp2G9Qu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h10-20020a170906584a00b0078adad5930esi12311317ejs.255.2022.11.16.15.40.26; Wed, 16 Nov 2022 15:40:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Vcp2G9Qu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234161AbiKPXH2 (ORCPT + 90 others); Wed, 16 Nov 2022 18:07:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234299AbiKPXHT (ORCPT ); Wed, 16 Nov 2022 18:07:19 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7536D3FBBC for ; Wed, 16 Nov 2022 15:06:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668639982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fWNz/QE0hFws1BC7T/rZzODjo9Sug+sYTjrv+WWI+bk=; b=Vcp2G9QuRqAMVFkfQ6Pf/qM3FTnlWuGTerNqq9aBGNcgEzWlZQn4N4pUW3Q8AnG/ZohdJN yAK9RZBOLe60KoVh0GTibTO1qG4KmSFOq47ma4kbrwPKK2ECgI0P5hoSkZ/W9LVURXDCXZ qJ0wQhhK7MmGvqrAXQNslJFEjBDtjB0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-321-Kh4_YGnwNsCefQGPtUsbUA-1; Wed, 16 Nov 2022 18:06:16 -0500 X-MC-Unique: Kh4_YGnwNsCefQGPtUsbUA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id ED237811E67; Wed, 16 Nov 2022 23:06:15 +0000 (UTC) Received: from [10.22.10.207] (unknown [10.22.10.207]) by smtp.corp.redhat.com (Postfix) with ESMTP id 35079C1908A; Wed, 16 Nov 2022 23:06:15 +0000 (UTC) Message-ID: <4b5142be-6a47-9dfd-a238-5b9d29b296b8@redhat.com> Date: Wed, 16 Nov 2022 18:06:13 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH v10 0/3] blk-cgroup: Optimize blkcg_rstat_flush() Content-Language: en-US To: Jens Axboe Cc: cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Ming Lei , Andy Shevchenko , Andrew Morton , =?UTF-8?Q?Michal_Koutn=c3=bd?= , Hillf Danton , Tejun Heo References: <20221105005902.407297-1-longman@redhat.com> From: Waiman Long In-Reply-To: <20221105005902.407297-1-longman@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/4/22 20:58, Waiman Long wrote: > v10: > - Update patch 3 to rename the rstat function to > cgroup_rstat_css_cpu_flush(). > > v9: > - Remove patch "llist: Allow optional sentinel node terminated lockless > list" for now. This will be done as a follow-up patch. > - Add a new lqueued field to blkg_iostat_set to store the status of > whether lnode is in a lockless list. > - Add a new patch 3 to speed up the freeing of blkcg by flushing out > the rstat lockless lists at blkcg offline time. > > v8: > - Update the llist patch to make existing llist functions and macros > work for both NULL and sentinel terminated lockless list as much > as possible and leave only the initialization and removal functions > to have a sentinel terminated llist variants. > > This patch series improves blkcg_rstat_flush() performance by eliminating > unnecessary blkg enumeration and flush operations for those blkg's and > blkg_iostat_set's that haven't been updated since the last flush. > > Waiman Long (3): > blk-cgroup: Return -ENOMEM directly in blkcg_css_alloc() error path > blk-cgroup: Optimize blkcg_rstat_flush() > blk-cgroup: Flush stats at blkgs destruction path > > block/blk-cgroup.c | 103 +++++++++++++++++++++++++++++++++++------ > block/blk-cgroup.h | 10 ++++ > include/linux/cgroup.h | 1 + > kernel/cgroup/rstat.c | 20 ++++++++ > 4 files changed, 119 insertions(+), 15 deletions(-) Jens, do you have any further comment on this patchset? Is it possible to queue it for the next Linux version? Cheers, Longman