Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7235566rwb; Tue, 15 Nov 2022 09:19:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf40eXxTMIbLCIQYdOFNUDu91zkms9cQVjdGo/WYX8tp7hUB3i2Bfc4mFjyhXf+7AKXAS753 X-Received: by 2002:a63:1341:0:b0:43b:ddc8:1a6b with SMTP id 1-20020a631341000000b0043bddc81a6bmr16606736pgt.268.1668532788018; Tue, 15 Nov 2022 09:19:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668532788; cv=none; d=google.com; s=arc-20160816; b=FtMqy57EYgIypZq5KH9nyfLwm01oAFeLdt8m6A2iJF7gmNjWHoHjlsyDA4Hf80eEym bdrVwvaNlOQGSwXcvlNzGLPfyOqCHAhfIX8DhaMmMBF3fhW0xa0y6FN/zNER52I6qNjd U1tAvE7uPbGWDzJcNifXGM49qAsrtDFzqTMqjwZYoWLTrVme3xxUYtUEDHDy3sC2yOnH lJvDogMdP3h5+7Fj9yhPkOPFJkDFPA7RybdGojBCIh92LKJHMh6pPiYeccIi/2ZjqrWI 5UvdUC6V6S6l1oiw+lJ/GM9PO7gv7kQDdYDT1RSlOwo61L8OzaLC5r215F4NAW75nm7Y z4jw== 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; bh=mphHOb91dA81eNm6zrgzZsbjN8Ohc/3yIAvdrTbJbYI=; b=p35gDq3G6LQpXua+W5GQcjDLkRfp/RKvpRRC4yitBxH/MjJo7NKds4s9/dHxrKiDYc mpRylq2t0EwdQm2hcb5vJyJmRwZE9EFnVQ4SKJ53kfxvSu6H3dvq1Wnq+p3khGXy9Iwx cVeNujt7cK4KuYFPMAKmVfoPmtfIbDx1CrwY4hoLirfv9rKxrBjX5ZaMDdPFMC/gWKWG yhWT0yBBQ24XyJ/V1GXkdIIaqEjC5n68hr4dUTEYQ21Ty9KWtqx1aiRsfVSuSDSwFoU4 j/pgXxOukpp3fjhP1f2J37DjZhO6q6KpxzI3m/vGY2FNiKzmJH1MoCpvjtR3KrIjiXlP 6mzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b="pVwc/aOm"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oo18-20020a17090b1c9200b0021823c190aesi10190717pjb.123.2022.11.15.09.19.26; Tue, 15 Nov 2022 09:19: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=@joelfernandes.org header.s=google header.b="pVwc/aOm"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231960AbiKOQCF (ORCPT + 90 others); Tue, 15 Nov 2022 11:02:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229624AbiKOQCD (ORCPT ); Tue, 15 Nov 2022 11:02:03 -0500 Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C2C3F0 for ; Tue, 15 Nov 2022 08:02:02 -0800 (PST) Received: by mail-qk1-x72e.google.com with SMTP id z17so9737742qki.11 for ; Tue, 15 Nov 2022 08:02:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=mphHOb91dA81eNm6zrgzZsbjN8Ohc/3yIAvdrTbJbYI=; b=pVwc/aOmwXdnDaJKer7siBqCPA2gfnv74Iphmkvg+WZQHkmbtqS854NYYYAa+U4+3e KHWeo4g02qOnund8YnBLeZ+H/y59pz5Kmd8vtc4CjHnP0iyTgLR1heMfpJpW35+0zywr IMytAPm6kkeqFJEUMVN098j/WrKCI6pCOq/Xk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=mphHOb91dA81eNm6zrgzZsbjN8Ohc/3yIAvdrTbJbYI=; b=AOdbHtvPopOidtPYflovP8iRdzXbjCllE+plmy9clHWlPT9fBrIjpudPHnsxyHLlWl RawUibzm421svLXtbi4KnkpSB4fK4u/nJR3+q1UMLBccD44P43SpBeTanA9KjFdCQXws 1NHnL3uQLVGpdaqYK9nUBd9m43/MCugRXUqOcpIm2gcI2jfR348/+XRxO6W/rSY5X+32 O+HlTVmiKvQ8hQ/p88vNWoij8wP4+huy51lYMJcIb6TxqIaQy36IAB97rqbzw1re73bN j+J9jbsCgccvLtJifHllpcj9hmtgRdUBKEs7e/EZqqRZzbjiGNoPg+pHgkD0gSz1lmyv icTw== X-Gm-Message-State: ANoB5pmRi2etbpcCvutP8ioxb9qU0BxG8sLmyKFPVXIZ2k34LOuxVbeS AnP2/GBk0+UmE030RQaKH/GGXA== X-Received: by 2002:a37:a893:0:b0:6fa:a188:a4be with SMTP id r141-20020a37a893000000b006faa188a4bemr15962834qke.228.1668528121244; Tue, 15 Nov 2022 08:02:01 -0800 (PST) Received: from localhost (228.221.150.34.bc.googleusercontent.com. [34.150.221.228]) by smtp.gmail.com with ESMTPSA id i20-20020ac85e54000000b0039ccbf75f92sm7413386qtx.11.2022.11.15.08.02.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 08:02:00 -0800 (PST) Date: Tue, 15 Nov 2022 16:02:00 +0000 From: Joel Fernandes To: Connor O'Brien Cc: linux-kernel@vger.kernel.org, kernel-team@android.com, John Stultz , Qais Yousef , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Will Deacon , Waiman Long , Boqun Feng , "Paul E . McKenney" Subject: Re: [RFC PATCH 10/11] torture: support randomized shuffling for proxy exec testing Message-ID: References: <20221003214501.2050087-1-connoro@google.com> <20221003214501.2050087-11-connoro@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Mon, Nov 14, 2022 at 12:44:21PM -0800, Connor O'Brien wrote: > > Instead of doing it this way, maybe another approach is to randomize the > > sleep interval in: > > > > */ > > static int torture_shuffle(void *arg) > > { > > VERBOSE_TOROUT_STRING("torture_shuffle task started"); > > do { > > schedule_timeout_interruptible(shuffle_interval); > > torture_shuffle_tasks(); > > ... > > } while (...) > > ... > > } > > > > Right now with this patch you still wakeup the shuffle thread when skipping > > the affinity set operation. > > > > thanks, > > > > - Joel > > > > Wouldn't the affinities of all the tasks still change in lockstep > then? The intent with this patch is to get into situations where the > tasks have different affinity masks, which I think requires changing > the behavior of torture_shuffle_tasks() rather than how often it's > called. Correct me if I'm wrong, but you are still changing the affinities of all the tasks at the same time (shuffle_task_list still has all the threads being set to the same affinity). The difference is with your patch, you occasionally skip punching a consecutive hole into shuffle_tmp_mask. I was thinking how you could make this patch more upstreamable, you are right calling less often is not what you are specifically looking for. However, would a better approach be to: a) randomize the shuffle duration. b) Instead of skipping the set_cpus_allowed_ptr(), why not randomize the number of times you call cpumask_next() to pick a random hole. These are just some ideas. thanks, - Joel