Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2789540rdb; Fri, 22 Sep 2023 08:25:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHjcj+DqFuR4FhWYKeKDQu4lYd22bkISWhKNv0BbEmdUgfgl58ZFbAyi55Pc7uQxNxLtxL5 X-Received: by 2002:a17:902:ce92:b0:1c5:ecfb:b69e with SMTP id f18-20020a170902ce9200b001c5ecfbb69emr1774439plg.56.1695396354415; Fri, 22 Sep 2023 08:25:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695396354; cv=none; d=google.com; s=arc-20160816; b=Nj09hXF2nO+3z2bsKVOdvHxZjN9D2JceNltOq57AqPz7APpoaScf/W2y8xpnBXNGup 3/08jOI/ecFM6QCCYKGdUU8YFFZaj3IfV4bnlhvRPLqzta2zIzvekOzTh6tEMAytY8gn TmYBLB0wNNBoz1LS0q7Wqx158BETT8CfTKx2/TGjYOujivpCouW22mACwl4cQzmzQlA3 zxgrZaso1vW6LueJ5mbs5/1+i+OiucG3pOxZjepVjgVc+33KMaugE44AkGbRJONLwG2R YTygctvt3FvmSn5Tdzj6P8lqeElOoUu1IPURKcwgJa21MLNI3+Mq36N3breZLx+T/2gp Ae1g== 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 :dkim-signature; bh=65+lm7d+dGRTiOMAyApVmU/Xt+Gy4JHwF9IUeIK1m1Q=; fh=L38IsoaQAWPeJguns+IudupET4MhbG5DN8hDIjADNyo=; b=n/5VQmP5CQ0hJeHCNxcL2PN/QUtiorgb6hkPaQCQrkFuehrG7Mfs2oYnoDbQl0O8ng OaFlHKMjJxzDgkDH79o3l6jGZ2s9SiN3l6aYSYiFwilyBtw0pZrepFziwkEOGfMq3rik ANIgjv4YDkgfzxidIWpKZzj8MKNCKy8vfuDv0jYD/wcgJW0pujOHpst5E1l0+I3rEgsf 4qfsekeh7PGYEPzL+9Pu+n9H48iV00XYDmTfNHp7h87Rtpo8wXxiuG/+1MR5/5PUsH6O 7tu6crYrftxB8wSjjby1628gHn1I7zzOX8auwsyREh3ZEye4Nv5Vda+gWLFdQstyjpUO HQmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=yJPzw4jK; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id u16-20020a170902e81000b001b9e82a6beesi4275917plg.548.2023.09.22.08.25.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 08:25:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=yJPzw4jK; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 02E7B856164F; Fri, 22 Sep 2023 04:42:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233780AbjIVLmu (ORCPT + 99 others); Fri, 22 Sep 2023 07:42:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233769AbjIVLmt (ORCPT ); Fri, 22 Sep 2023 07:42:49 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C067100 for ; Fri, 22 Sep 2023 04:42:43 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id EC2E621A9E; Fri, 22 Sep 2023 11:42:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1695382961; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=65+lm7d+dGRTiOMAyApVmU/Xt+Gy4JHwF9IUeIK1m1Q=; b=yJPzw4jKA78/KuVPeDtJPzXDAGBL5vPvSoxnuXVCM8RAh2RYriDdPP+yZAKS1CutJLntVi FFh4Iud6erKaiL6VZAjIt13auEAuC/Ru/cFgGCnz0KDuU75TY/uTVxI288PcND9Fv3aST4 gkCLkcAXbu43vZ1RiVGQ5jRQknt5Ec0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1695382961; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=65+lm7d+dGRTiOMAyApVmU/Xt+Gy4JHwF9IUeIK1m1Q=; b=fLpi/29qParzWJqJjq1VQuYRYSpCWpAK2Bu9U9mzTnpOu+5h7/MOI5YeDEWFf+l3OCP1Wd cS4+u8sAD88kp2DQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D311113478; Fri, 22 Sep 2023 11:42:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id w6kLL7F9DWXnJAAAMHmgww (envelope-from ); Fri, 22 Sep 2023 11:42:41 +0000 Date: Fri, 22 Sep 2023 13:43:26 +0200 From: Cyril Hrubis To: Ingo Molnar Cc: Petr Vorel , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org, ltp@lists.linux.it Subject: Re: [LTP] [PATCH] sched/rt: Disallow writing invalid values to sched_rt_period_us Message-ID: References: <20230901154355.5351-1-chrubis@suse.cz> <20230901174529.GB364687@pevik> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_SOFTFAIL,URIBL_BLOCKED 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 22 Sep 2023 04:42:51 -0700 (PDT) Hi! > > > Documentation/scheduller/sched-rt-group.rst [1] specifies this as values from -1 to > > > (INT_MAX - 1), I guess due int range. Looking into proc_dointvec_minmax() [2] > > > even INT_MAX would pass the check. I suppose we can do nothing about that, > > > because there is no value in sysctl_vals[] which would represent INT_MAX - 1. > > > > > > And you specify in LTP test range: from -1 to INT_MAX. > > > > > > But even much shorter value than INT_MAX fails: > > > > > > $ echo 1234567 > /proc/sys/kernel/sched_rt_runtime_us > > > sh: echo: write error: Invalid argument > > > > That is because runtime_us must be < period_us by definition, since > > runtime_us defines how much time is allocated from the period_us. I > > guess that this is not described good enough in the kernel docs. > > Mind adding a second patch to your series, clarifying > Documentation/scheduler/sched-rt-group.rst? Yes, that is the plan. I've been working on LTP release for past two weeks so this has been postponed. I will get to it hopefully next week. -- Cyril Hrubis chrubis@suse.cz