Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp408829rwl; Wed, 5 Apr 2023 02:25:51 -0700 (PDT) X-Google-Smtp-Source: AKy350YY7R9WzsvqZDR0un4xOzcU3CFfzJwABGwO7//h6C2HT6wIIkuQg8CByIsbKBIFKG6Y+RW1 X-Received: by 2002:a17:907:11cd:b0:93d:770:25df with SMTP id va13-20020a17090711cd00b0093d077025dfmr2139615ejb.37.1680686751203; Wed, 05 Apr 2023 02:25:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680686751; cv=none; d=google.com; s=arc-20160816; b=CeDVFoyJIusYJqhzv5+bwN4DQMsJG6S+QFmcjDL7NfCz7GCNNWGEllosWTE0AeKzHY 2hjRzVL4zw5vpKg3MgZRLMnwL+28VPhO9ekKHxVQwXYWgNvulGoicsMYx+73zWHVru2b fwKhKqIEDgKfEVEdlCnnUT3Ii0GuJN4pJYb/m63NEv+HxexlZDmujoFl9GDFt5eAWbRt ApZcVLrKP/o+QeeILHb4IU9TJ1vR6BKt9uhmSUL2P9m5Amxz/DckZ3kwJPx/Rk9iL9Jj 6+/V369Gp69cN0x3hJlXdzPQsshLkUjOvZk0OlW6g08uy0VN7uVSCcjNBvk0iZZEFSf4 qTww== 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:date:from:dkim-signature; bh=m5eGS81xIRzLVimyFVJHz1me2KIfa7Aw0JDi4lE6yBw=; b=dVhpOEz4nX8JP70ydEVaBkvA5z8zrTU0J9T85iJ+kI2QZ1jKkJS3RXKc0DcEgNpB+A p7qF3cwsXbhJB4gewwurqYaDyrxbOKXGRDPSBM9+6XbatQCZZ1p68jpWYMS7WPj1SG06 krWsQF4S5amdkwx9jpOxXw8Cb3tHrD2Ikh1jwwKWkfxJanCvw+JpFcqeE+m2dhzWMInN +up5Pekd4XnFDfrR84sG6r02jfZyvY755LDOFZMyWpm9poU4CMbsGnNIYNupcIBlsW4z NxZGTDnr+fH/izIYYaz0vmn4LG0Dm770qSagRVA6yKUSOt3hzfCKm8jmd6XIiiWDRxgE mSpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=TbCR88LI; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ky10-20020a170907778a00b00933f92e9917si11736029ejc.371.2023.04.05.02.25.26; Wed, 05 Apr 2023 02:25:51 -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=@gmail.com header.s=20210112 header.b=TbCR88LI; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237146AbjDEJKu (ORCPT + 99 others); Wed, 5 Apr 2023 05:10:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237269AbjDEJKs (ORCPT ); Wed, 5 Apr 2023 05:10:48 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9C4B30F8; Wed, 5 Apr 2023 02:10:44 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id q16so45705811lfe.10; Wed, 05 Apr 2023 02:10:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680685843; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=m5eGS81xIRzLVimyFVJHz1me2KIfa7Aw0JDi4lE6yBw=; b=TbCR88LIwsj+xunQFMt8mYgULUxfDkMgKE704G9q8TE7up5QaiL3uV0TuVe7A1EAme l1C4HfppATuridvxmMYvFEcdU6dlgjOFjL+VtQEFN3b+m+tTpIAe7/25wPFSzhlFvIyQ Sjeu9j2PjeDpsYI97wiDXx9nEtCNeUDBJclyEfPei+so20voQiqeOTlYC4ZvJmakq9dM PYY2LVGSZNw0fL/F4xgf9RINzkRqwkGFHhIMkM9SOWMXHm1gPVY3O+90P+sM2hOS6vBd 8c7xZATz8lSKLxJwFuxFiwfFbfA6Sj/7nX4xQ3+VEBK5DyeDsfEOWNCbz1dyEPvvgQm5 eDnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680685843; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=m5eGS81xIRzLVimyFVJHz1me2KIfa7Aw0JDi4lE6yBw=; b=6boarZeUNvA+2Mv5i9WZszZ3In1QoOeYwIl5NRNOphIyy+BkIWfHACohiOVB1193oo VZI4HW3nxloA2KarrKwrA0fb1lFBWVmrBam1wReWDB/51oC0oZbRzOypPG68//Ymh4v2 0JhVDK2DvSfAiRQ3waoBU83h7RJr6HOOulcl3Q/4RJsyYP/1bNYoMdagqgSVesN9re+J tJQmbHvlKImkzGpTvugOeKEAIvbnmQeAy6mvjmG9z6pjwMaDu7e17igRuGFFG7jlckWG J17NBzuYeogDBU1t8+48ym73SMhSd9M8rascQdvZa/zNdc5BOjjr9jh2UOok3lPE2YGw Doow== X-Gm-Message-State: AAQBX9ecy4mVzsXhtikZuThWI6RMixavdz7w5b/AcYFPlX7aemVU0Hzg kihGeowOynr0VOVrwZt4T1E= X-Received: by 2002:ac2:4294:0:b0:4e8:44a5:6018 with SMTP id m20-20020ac24294000000b004e844a56018mr1371310lfh.44.1680685842747; Wed, 05 Apr 2023 02:10:42 -0700 (PDT) Received: from pc636 (host-90-233-209-177.mobileonline.telia.com. [90.233.209.177]) by smtp.gmail.com with ESMTPSA id l14-20020ac2554e000000b004e811e3554dsm2756772lfk.185.2023.04.05.02.10.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Apr 2023 02:10:42 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Wed, 5 Apr 2023 11:10:39 +0200 To: "Paul E. McKenney" Cc: "Uladzislau Rezki (Sony)" , RCU , quic_neeraju@quicinc.com, Boqun Feng , Joel Fernandes , LKML , Oleksiy Avramchenko , Frederic Weisbecker Subject: Re: [PATCH 1/1] rcu/kvfree: Add debug check of GP ready for ptrs in a list Message-ID: References: <20230404141300.908202-1-urezki@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 Tue, Apr 04, 2023 at 05:00:13PM -0700, Paul E. McKenney wrote: > On Tue, Apr 04, 2023 at 04:13:00PM +0200, Uladzislau Rezki (Sony) wrote: > > Triiger a warning if a grace period is not passed yet for > > objects queued on a linked list via rcu_head structures. > > > > Once detached, take a full snapsot of GP sequnces to check > > later that a grace period is passed and it is safe to free > > all pointers. > > > > Based on latest 'dev' branch. > > > > Signed-off-by: Uladzislau Rezki (Sony) > > Very good, thank you! > > I queued the patch wordsmithed as shown below for review and further > testing. Please check for any errors. > > How should we go about testing this code? The way that it would get > exercised in production would be during an out-of-memory event, correct? > Either by flooding kfree_rcu() calls by many threads or simulate a low memory condition. I applied i high pressure using 1 000 000 frees by 64 kthreads on 64 CPUs system. IMHO, we have two GP checks, one for bulk and another one for list and it looks like enough at least from my point of view. -- Uladzislau Rezki