Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp445158rdb; Thu, 5 Oct 2023 10:17:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHwuqlm+/DKmzVQiMBRwjHBxcNCat1LK6TqyCLAq880LjcazGlAz4Gzsc6r6TbwyP03jygS X-Received: by 2002:a19:e05d:0:b0:502:fd08:69f7 with SMTP id g29-20020a19e05d000000b00502fd0869f7mr4924776lfj.28.1696526268568; Thu, 05 Oct 2023 10:17:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696526268; cv=none; d=google.com; s=arc-20160816; b=ZPyglZRaYuvxEADrQhdMphNbITd+O5y4xOTxKdCYK0YF6QKSuzAQgnD0B1Q28H0JPl 9lKFE42EDajIUcFWSFU/fCTc4QjSkGViCppo4zyhpOIUKXLOHKC8qdxxkALOKgFuFFcL I/IpoeNEFiVSHFaOZLc4XIll+DM8NVG/gNu1KRYdlvQ9seSyJcLLwgUHBwVQ+UZFImHa 6H8Y1NQcLFeEp9tUrAuDcp92uW1kDarsNOk0WjzdyCwrNiU8tTOst0fyIfjPCRI2IzR+ DfWsJkQGqjobPZ9O6dvwAwHnfQfgbW05UE1Jt53QTD7hWmspvEPd1IGFgXoztjmIypYa t8OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=KKcKcbN0G6E1ZA/muCY4Z4QSr4fIlnQTBllEL5N75xE=; fh=hGEgc+H2lqjQZHittc2ha0RF7HaeXzWWvqMTXCnUr/U=; b=SGv3K/dIFMAr+SqK0U7J8EHUWWQji0t/5G4moY73cAJDG6brNGCEgEJ4T3fLdpihrx zIw0ZpqYKTJ7X5gIMrT8f8FirN8tvL1kqB9VQbfR52eXGd8qpPu9gha6z3RKNQQBkUQB LPZw2DQRuPJBf1u2kLLGZSYyax1v5HAkCqc7Yd5469PADIInlDW3VQpIUbGyQWEpIeB7 Z5J68R3Evk9mgX/HBQcbzyIC/eQgNJAWUaIo9xp/OHkjyNDlUkbZN/BOVHuc4AkTUNjT EYsFtkfKVkr5se2N4k6ztEKuyzxt1Pp5//HkPZcxOeuuXS1RciXIlrh5GO8GsJmeZCVl SHqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=d1ISXUNz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id q10-20020ac25fca000000b005041bfbaa07si1496640lfg.18.2023.10.05.10.17.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 10:17:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=d1ISXUNz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id A15CA80A2830; Thu, 5 Oct 2023 10:16:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229620AbjJERP0 (ORCPT + 99 others); Thu, 5 Oct 2023 13:15:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231156AbjJEROu (ORCPT ); Thu, 5 Oct 2023 13:14:50 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 255BD2721 for ; Thu, 5 Oct 2023 10:05:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696525521; 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: in-reply-to:in-reply-to:references:references; bh=KKcKcbN0G6E1ZA/muCY4Z4QSr4fIlnQTBllEL5N75xE=; b=d1ISXUNzF8e+YE8UHhif4pclFZ/lIHdnIX0zEmgoUoVQLDhhkiR8GSCWxLNWiu+NxVtAy3 N8H6wDOPcrrsO4heSlfXHmZh97v9+6BLU5rroMnsmgglJ0oCEf+9vt90zHDQwVXGAvVmOe O5ov9cMWJG9ZMZUnGvk8BzypRx74Rao= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-296-XZ12uclKPy6PIwXfFzFfYw-1; Thu, 05 Oct 2023 13:05:16 -0400 X-MC-Unique: XZ12uclKPy6PIwXfFzFfYw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 12A563C0F670; Thu, 5 Oct 2023 17:05:16 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.224.69]) by smtp.corp.redhat.com (Postfix) with SMTP id 36232492B05; Thu, 5 Oct 2023 17:05:12 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Thu, 5 Oct 2023 19:04:17 +0200 (CEST) Date: Thu, 5 Oct 2023 19:04:14 +0200 From: Oleg Nesterov To: Li Nan Cc: Khazhy Kumykov , tj@kernel.org, josef@toxicpanda.com, axboe@kernel.dk, yukuai3@huawei.com, cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yi.zhang@huawei.com, houtao1@huawei.com, yangerkun@huawei.com Subject: Re: [PATCH] blk-throttle: Calculate allowed value only when the throttle is enabled Message-ID: <20231005170413.GB32420@redhat.com> References: <20230928015858.1809934-1-linan666@huaweicloud.com> <4ace01e8-6815-29d0-70ce-4632818ca701@huaweicloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ace01e8-6815-29d0-70ce-4632818ca701@huaweicloud.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 groat.vger.email 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 (groat.vger.email [0.0.0.0]); Thu, 05 Oct 2023 10:16:08 -0700 (PDT) sorry, didn't notice this part before. I am not a asm expert (to say at least;) but On 10/05, Li Nan wrote: > > When (a * mul) overflows, a divide 0 error occurs in > mul_u64_u64_div_u64(). Just in case... No, iirc it is divq which triggers #DE when the result of division doesn't fit u64. (a * mul) can't overflow, the result is 128-bit rax:rdx number. Oleg.