Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2457628iof; Wed, 8 Jun 2022 05:29:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6DnkTb6PfortnToVxsJ71YZe4ERNqAwYhws5u8lMiO8QHuUZwS1BuhGJCtLYcqK6pBVPh X-Received: by 2002:a05:6a00:2389:b0:51c:3ca7:b177 with SMTP id f9-20020a056a00238900b0051c3ca7b177mr8258144pfc.17.1654691358822; Wed, 08 Jun 2022 05:29:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654691358; cv=none; d=google.com; s=arc-20160816; b=d29ShSloq70Jp8IIYaI2Xa0U62EMSl2Dw6uXxQLB6XkN4+uAZkw39rxhazUzkz59wu DlxVfRFF2pNmXpxGMaqwLxOszPO3q1Rj+vR0UyqWGS8705QIn6Fkwxbd8oGNUqmbk8U0 wtXYcFmoi6hXcdra8lqM2BeMJlgdhLL63dYceaTDOPD37NHuASS2nL5FxHOtn7fbhM1k b8q432zSQnBl1xWTatgovG2SwtLoaOMw6DR5HdIjeRwilmTMQpKANnQ7DJv/fxmkM5C4 w5ZzmW3l1NNNbCUkJhdBpxbU+V6NTen208AWwpZAq7IuXUy1YgjSnCAKQZdqHAU0TYCk 1+Nw== 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=8/naVlH4VbKoVbZ8W2O6t93AKCSiORy4mCDQBAFpizU=; b=KJCKHTJBmU8ipNS7NuNzdRpENz88Rtf2zZ3gikPQYpiKKLAMDluNnJkMa+xLwjW007 DFNhK26yxUqIFw75B5cS1BloHyL71yygOFLy+zPeK0HBQi2v7uzUxiBF8jd87sFLLHWc Xb8m8eJdS80+jvJjPOY6Ge44Ly2oztw4EypjHBVkdCBYy/zS8END1IZkhWhxhUWbGrC5 6of3ecmVaeU34yC+Bs89w3VuTxoI1gf4plJo7uL+hSxPX8Ja8oxr8vpmdUgVNl2bgXFQ c9ILDv79h/kiSRg6uAnnBj7ajlCc2vTfgSg52FHH4QePqgG5pX5kCAOnULF0RGk/Du7P qiyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="OF/vOiW1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u17-20020a170902e5d100b0016646a4d661si220957plf.377.2022.06.08.05.29.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 05:29:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="OF/vOiW1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 27A2924EC51; Wed, 8 Jun 2022 05:02:03 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238443AbiFHMB7 (ORCPT + 99 others); Wed, 8 Jun 2022 08:01:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238432AbiFHMB5 (ORCPT ); Wed, 8 Jun 2022 08:01:57 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B69BE24DE4B for ; Wed, 8 Jun 2022 05:01:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654689714; 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=8/naVlH4VbKoVbZ8W2O6t93AKCSiORy4mCDQBAFpizU=; b=OF/vOiW1z58wOHD4fyqGQiVI0VQmh+DhQfumPaJ7kKj2u9qCUYRPepsXrw8fYJm1U+Meh2 6/EOokg/r5DPx4piQ4pcUWpibRnJVfS6oSCs7MhKVAEqqckiggUqrdREv7xlie7H25t3ul PCIcSqPP+V1glNBPVqQR8a/TlbV0fIk= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-537-1WMpe9l4OyKLP4aBWS64lA-1; Wed, 08 Jun 2022 08:01:53 -0400 X-MC-Unique: 1WMpe9l4OyKLP4aBWS64lA-1 Received: by mail-ej1-f72.google.com with SMTP id p10-20020a170906b20a00b0070c21a6d378so7245796ejz.2 for ; Wed, 08 Jun 2022 05:01:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=8/naVlH4VbKoVbZ8W2O6t93AKCSiORy4mCDQBAFpizU=; b=l/6CJqqZ+5bEeAnR/F2bm3+vWeFcKT7pKPROsZJkJNzimWnUn/DAHlZn8CjINGDR7y 09bWiaAD4eMiz9YldSULGtr9HxtUIC3YOgzp+JWgQOThac1/HIsemxk1xCd99Z3PGsGo CG6xTzfRZKF0GbRDS8mwpfaPWdLW7yoaQolMYeIf0w/1/wLeOJXyqV3AT+WTtjeHrEBl 2bPGGuLXf1Fpevjd7OOEQoNC+/wjinVodivKzmbkYqrqFXABSWb9fjvNMK/67Fl2WVFO Pei7pN5elkPCdpz0TptNDwZrCnS/sQPCzfXY0v3i6BJocPdKPO32Rzbjj2CJwvzg+pUo cxWg== X-Gm-Message-State: AOAM532W9tfdvWCWSDJst7bFMCJSP90sxKfYdq7m25H3IQqb0oBNOre2 QpwUT3B4ASo1RqGJ4tLqqBJW9vRLIEiG6gHbJNMsJdWOoUK126hDFF0SVe1WH+os12sUh+H1SBd TxFhgH2/ou8uaM7WZ84+TJaz8 X-Received: by 2002:a05:6402:51c7:b0:42d:f4ea:c09 with SMTP id r7-20020a05640251c700b0042df4ea0c09mr38544745edd.319.1654689711926; Wed, 08 Jun 2022 05:01:51 -0700 (PDT) X-Received: by 2002:a05:6402:51c7:b0:42d:f4ea:c09 with SMTP id r7-20020a05640251c700b0042df4ea0c09mr38544707edd.319.1654689711640; Wed, 08 Jun 2022 05:01:51 -0700 (PDT) Received: from [192.168.0.198] (host-95-248-229-226.retail.telecomitalia.it. [95.248.229.226]) by smtp.gmail.com with ESMTPSA id b2-20020a17090636c200b00705fa7087bbsm9235569ejc.142.2022.06.08.05.01.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Jun 2022 05:01:51 -0700 (PDT) Message-ID: <2a55de85-13fd-f501-b942-37bd2df2c616@redhat.com> Date: Wed, 8 Jun 2022 14:01:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v2] sched/deadline: Use proc_douintvec_minmax() limit minimum value Content-Language: en-US To: Yajun Deng , mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com Cc: linux-kernel@vger.kernel.org References: <20220607101807.249965-1-yajun.deng@linux.dev> From: Daniel Bristot de Oliveira In-Reply-To: <20220607101807.249965-1-yajun.deng@linux.dev> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE 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 6/7/22 12:18, Yajun Deng wrote: > sysctl_sched_dl_period_max and sysctl_sched_dl_period_min are unsigned > integer, but proc_dointvec() wouldn't return error even if we set a > negative number. > > Use proc_douintvec_minmax() instead of proc_dointvec(). Add extra1 for > sysctl_sched_dl_period_max and extra2 for sysctl_sched_dl_period_min. > > It's just an optimization for match data and proc_handler in struct > ctl_table. The 'if (period < min || period > max)' in __checkparam_dl() > will work fine even if there hasn't this patch. > > v2: > - update the log message. > > Signed-off-by: Yajun Deng Reviewed-by: Daniel Bristot de Oliveira -- Daniel