Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp106672rwl; Fri, 24 Mar 2023 22:04:56 -0700 (PDT) X-Google-Smtp-Source: AK7set+SbUw0ynQU+Ln3gZuz7lVuXuEJ+cjkiYbbc2TgZ4p1FGy8MiI8ndjt0ZX+rcZsCYydN19Z X-Received: by 2002:a05:6a20:671b:b0:bc:b9d2:f0f8 with SMTP id q27-20020a056a20671b00b000bcb9d2f0f8mr4511357pzh.24.1679720695984; Fri, 24 Mar 2023 22:04:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679720695; cv=none; d=google.com; s=arc-20160816; b=bgD0XYj5DljFbsayFwkskcYLEG6MkMViNpJk6ZoIQIw1PXGdEUYhHTnL7rV1PoeXdB XzU2VeIzquSTr8XEwGHVkcp1COW0fm5PdNbL+xnegjoK2EitrfilTkOuUdhEWcpWtOAz PctbWtE69kwAIpZGkcE36BRTmQbWVwEdkUGYyji+iyA69wmnNTiN8ZCi95N+T9PeH5dk jYvwrfD7Cjg/17uEzFA9EuaoZc1a0jGrHy9RBNCAvcIC4B7f9d/uvAltrpmQtlkguohn 7JlsEH5HrkeYr8KPztcDmUdNULDj5P2kIIhKlSRWsI5HC9XiVRFy0BXr3XH6gq+1LsVZ CyNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Aev6aZrFaneoIiT/5tO9n5SSh+Wv4Vl/zFxv2Nlcyh0=; b=Yw3oehUcxKUInROcu/XYsC5dvSMnLObkXVQ3VQKRTpLdWL/OmZjUou6err4HidN+pO Nb60hLtvw1gWVTc9z74eK/2mShXeIaMx0BVClnJKdGxGTXMw1hR9nNxL9Zk0pkN83o+6 Ko+++OUMw+DSi07r+cfTjFiLHv27hQCyN9MorG1UAonNlVZR1cvjBtHOZyjV4at5fDlq 4CRTydoPtbfhlWHIUKQBgd4avlbUstHsID32MRYcjcrgiSNwXMLMkC/M0FOO3ti43HjW Lrl/+xncLbNvJUiLgw9wspXMfPzk+CUqT+sNh8dADYWHWUzd3teugQt0ryRBNvdfZrjX LmlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=jN2jTtgX; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o1-20020a056a0015c100b00625ebc3b265si12971821pfu.241.2023.03.24.22.04.33; Fri, 24 Mar 2023 22:04:55 -0700 (PDT) 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=@google.com header.s=20210112 header.b=jN2jTtgX; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231572AbjCYEqV (ORCPT + 99 others); Sat, 25 Mar 2023 00:46:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229578AbjCYEqT (ORCPT ); Sat, 25 Mar 2023 00:46:19 -0400 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2148F17CDE for ; Fri, 24 Mar 2023 21:46:18 -0700 (PDT) Received: by mail-yb1-xb2f.google.com with SMTP id n125so4631795ybg.7 for ; Fri, 24 Mar 2023 21:46:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1679719577; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Aev6aZrFaneoIiT/5tO9n5SSh+Wv4Vl/zFxv2Nlcyh0=; b=jN2jTtgXG0MrqNXQHFKmsc791+de108Oh0Rhy1JgtjGoPG4Hj5J7eUVxCplL/0D7fL w8DGJQ33Zi5JSMExvCHrjTVMdaBX7d9GQzf3sh4ZraMPUlu6+NC5KSEf8XeOa5xRIjhJ hYE3O49f9xjjCx0uDYS77v95m03lU8he8bktQo8exbPFh8JntTp7XxH7+pxNleBSTUpV rzuW18l8MU2WF/D+z+glfnWAPNxInVBOC3pY0fpfODA8RkDXbBdPIw6M6eLRlxzcDyJj br31rqbMmHpBn3kWbKf4bjMoluldCcJAWs3ys6pKgCwDrUJSLBvdwk8wZJz5STfGKyxt opdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679719577; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Aev6aZrFaneoIiT/5tO9n5SSh+Wv4Vl/zFxv2Nlcyh0=; b=tIjrfsUnam+smyohDjqb/YwLooxebXvMUcpQJiw3vIZLzxykg9y+nomZFC3cKptp3S rr5oun+9YCS0vkxprEqNy0Bk8KrHEH/xpynjmPZWQyM2LdIRGXQwUstQloHNgnM9IVWu ekoCyzmUOHvBVak7DNwFxQg4t7hZCjcXOhyHmogqnXrSbkn9Qw0u3Tojfw7S5TBdHrcJ cZhWMoaCMbsUrvVFYGoHSWAqNTJXfVGRchSa5akFu2/aS9rdWeb5sd8cqjChbn+MBI4Z SwQH1u9y5M6vdcjWmQV7D6mjWYCF6BKeGqkTerUuqQVttg+ErH7oj53r572MEJNhI8u5 xFvw== X-Gm-Message-State: AAQBX9dFZ7Oby0yka9U5ayoPzR9IEdngG7I7gvWS+QM0J+Azr83EoqKC 19w3AduMYZGwwxUYRwuLMNwhqqTmntpSFw+2t9nBWQ== X-Received: by 2002:a05:6902:a93:b0:b78:5f10:672a with SMTP id cd19-20020a0569020a9300b00b785f10672amr1584792ybb.12.1679719577172; Fri, 24 Mar 2023 21:46:17 -0700 (PDT) MIME-Version: 1.0 References: <20230323040037.2389095-1-yosryahmed@google.com> <20230323040037.2389095-2-yosryahmed@google.com> In-Reply-To: From: Shakeel Butt Date: Fri, 24 Mar 2023 21:46:05 -0700 Message-ID: Subject: Re: [RFC PATCH 1/7] cgroup: rstat: only disable interrupts for the percpu lock To: Yosry Ahmed Cc: Tejun Heo , Josef Bacik , Jens Axboe , Zefan Li , Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , Andrew Morton , Vasily Averin , cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, bpf@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-15.7 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL 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 Fri, Mar 24, 2023 at 9:37=E2=80=AFPM Yosry Ahmed = wrote: > > On Fri, Mar 24, 2023 at 9:31=E2=80=AFPM Shakeel Butt wrote: > > > > On Fri, Mar 24, 2023 at 7:18=E2=80=AFPM Yosry Ahmed wrote: > > > > > [...] > > > Any ideas here are welcome! > > > > > > > Let's move forward. It seems like we are not going to reach an > > agreement on making cgroup_rstat_lock a non-irq lock. However there is > > agreement on the memcg code of not flushing in irq context and the > > cleanup Johannes has requested. Let's proceed with those for now. We > > can come back to cgroup_rstat_lock later if we still see issues in > > production. > > Even if we do not flush from irq context, we still flush from atomic > contexts that will currently hold the lock with irqs disabled > throughout the entire flush sequence. A primary purpose of this reason > is to avoid that. > > We can either: > (a) Proceed with the following approach of making cgroup_rstat_lock a > non-irq lock. > (b) Proceed with Tejun's suggestion of always releasing and > reacquiring the lock at CPU boundaries, even for atomic flushes (if > the spinlock needs a break ofc). > (c) Something else. (d) keep the status quo regarding cgroup_rstat_lock (e) decouple the discussion of cgroup_rstat_lock from the agreed improvements. Send the patches for the agreed ones and continue discussing cgroup_rstat_lock.