From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7CA541ADC97 for ; Sun, 4 Jan 2026 22:03:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767564211; cv=none; b=lQYMZXUXcj5RU2Pw/EggBh+zoDOKvAnsIl47Nrvy3ATmXorLo1mQSd4/GjCaEULI13GiCOEKRq1oKB3Mo+cufHzeN4Y58xSMyeg+5pBKtT8Ri7CQWdVljSri9XCbWqp6/aYheAQ+nyJhsFLsIOogYiEQ9lDFsY7smZNkWenT+JM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767564211; c=relaxed/simple; bh=DkQOWU1msDZA9fCelOJBPY6aKyCrXzMtmWVkCAsfGY0=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=poJLilRBFg+ywtorPv3f3JjCtYMiZafTfdaQGWxtqguKnR02IrGQoVQrEEF+CJGPwc0QicYPgH9vUsPPt1NvQolXdJmJU6hMCGnaFj62GZn5kbFNvQ4Xpek0lmrsg50pi7S/J4NhOae01YfpO/mBed1ZA3bQpFMYYYTs+bpQxvg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=M1/3gnPa; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="M1/3gnPa" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-430f3ef2d37so10861037f8f.3 for ; Sun, 04 Jan 2026 14:03:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767564208; x=1768169008; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=R/utbBw4BYRW/Ij+OA7vHunBORypFIrvwV9tyusxLPU=; b=M1/3gnPaJM7OYGRAz5ucC03o4ttEcdBcxDJ8b+/Boq30xqs7E1QRGUl05v9JK5YqeX Fhi4gRyo8fn0ueVcVu4QiLkk+3lO93vCRN+mRB7qviKJLA0kQGk5Fv14UszA+Q0mImYN EVESar+Bog2bHoaQJK0lk9DJur/sn4R4T1CyUBBXdfQioQJFlksLNEprT3b7sUiCqql+ JVSkBT76lt5W00p+92RCWJeRn9OK/C7kOD0KiBLg2VAJgma7qc3sfi/nO6RowkVRTDtE VtzDVGaUQXbQNQ3MAFgfyk5HuBZrwFhjCMgqfvddQt7lRc/DhCOlAHdzaR/T1cqlC86b ka6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767564208; x=1768169008; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=R/utbBw4BYRW/Ij+OA7vHunBORypFIrvwV9tyusxLPU=; b=veKZmHhHn+82+fCVbyzwxvH3cWoC6XsBdqCB/bnxjaQ94xbWXp6HVZE4Ou8snmmEUB vZGcqR5jJu+viR59VhtqG5WH76WIyKNVavRcAPWKTFuLb23Q9z/003h3W77D6+O7QcrD LTAJ137ui+O0WXyZnu3VhOwwbTjiKrI2A8MlYCLMWBT5T97LzWwFw1+iFZqbPA/VvsWi 2KXvZeJt4/vGqq6aaADTtRV1WMTI/OY8ugp0sOyF4IxdI/ZpIeRANWKs2MA3lGxihwCA EA/bVJf70PnmeFRIvDMAjdZGbjqWqZV9PKPPLxT/N16P9dczlg0H6WM5d9O3kiAqKpYc 3+5w== X-Forwarded-Encrypted: i=1; AJvYcCXBPJ8qx1aWKLBzxd0RYcfB1pULVLtHfIWqNLL5Vg7vtuMMdo7brd1BSJKjlFps/VPoQwhcRhYXCBvofPs=@vger.kernel.org X-Gm-Message-State: AOJu0Yzm3v7OvFZpdwHKRqONQrnZ9QRHrX9VU4S6//0X8TTPSw1y7B1d GH4R9WYBlOn6ixcYM3q7nlMjM3srh1sorL3VNYX4YPzsmyg/YdXRHm/P X-Gm-Gg: AY/fxX4dKAatAfT86Y6MbWVl80fcFllLCyqCRv+2BWY/hr4CnH0QdS91zSpa7HlmteG BsdhdRV2DG0f0ok6IeRsA+WByjICFBio9OODsCVIS9Mklcv6Z9ZwLMhkn30sr2A4FagRdO9qsrR JA68/c6Dc2hJa7dcLmeShi45dZ9piGfo6TIxpOh2hLDMyb+SWyVROGSoAnn5rWTcpoCnqZEM8bT S0/W8sxIEGVUv+8wRtNnKGDKOaRHkIFDGxpp42HDv2JVZ+PTJuFQjef2Hi6cqRWchnkL5aalZI8 pr9/UoO+Ms7PsXDBH6ic6JgGa0T6ftJwpGG2++zAoYFqFR4Ku4JkL6WKqvQ5GwYH4BgKUwDceFF w4tRhkOdjEUC2UwhjiCPoWTspRucipEasvT7Yv3nKVtZkmkLkDihqnoFznYSqbsQJbY154VEZHC 3ypPWrw/LMukfhlwol5UDN8jxm+lXkueWM9KIHJl+5+VERUsT+mTKF X-Google-Smtp-Source: AGHT+IFYkRuHom1yJISQcOW48XX4SE+NHTnYzPBu2m4UO9isoGfw5w+sns4nnKFwI/QhOugG1N74dw== X-Received: by 2002:a5d:63d1:0:b0:432:58c8:b90e with SMTP id ffacd0b85a97d-43258c8bbbfmr50681857f8f.15.1767564207592; Sun, 04 Jan 2026 14:03:27 -0800 (PST) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324ea82f6asm99008366f8f.27.2026.01.04.14.03.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jan 2026 14:03:27 -0800 (PST) Date: Sun, 4 Jan 2026 22:03:25 +0000 From: David Laight To: Oleg Nesterov Cc: Xia Fukun , Peter Zijlstra , Ingo Molnar , "Li,Rongqing" , "linux-kernel@vger.kernel.org" , "vschneid@redhat.com" , "mgorman@suse.de" , "bsegall@google.com" , "rostedt@goodmis.org" , "dietmar.eggemann@arm.com" , "vincent.guittot@linaro.org" , "juri.lelli@redhat.com" , "Zhangqiao (2012 lab)" Subject: Re: [????] Re: divide error in x86 and cputime Message-ID: <20260104220325.0c9b9097@pumpkin> In-Reply-To: References: <78a0d7bb20504c0884d474868eccd858@baidu.com> <20250707220937.GA15787@redhat.com> <20250707223038.GB15787@redhat.com> <2ef88def90634827bac1874d90e0e329@baidu.com> <518a5712-3348-4acd-ae26-529621143ef7@huawei.com> <20260104181501.740884d5@pumpkin> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 4 Jan 2026 21:30:39 +0100 Oleg Nesterov wrote: > On 01/04, David Laight wrote: > > > > On Sun, 4 Jan 2026 15:23:19 +0100 > > Oleg Nesterov wrote: > > > > > Peter, Ingo, > > > > > > can you take > > > > > > [PATCH v3 0/2] x86/math64: handle #DE in mul_u64_u64_div_u64() > > > https://lore.kernel.org/all/20250815164009.GA11676@redhat.com/ > > > > > > ? at least 1/2 which fixes the problem with #DE ... > > > > ... > > > But this code needs a completely different fix. > > Of course, this is clear. The fix above doesn't even try to address the > problems in cputime_adjust() paths. > > But. To me the fix above makes sense regardless. mul_u64_u64_div_u64() > should nevet trigger #DE, and I thought that we already discussed this > before. > > Do you agree? Yes, I think both the generic and x86 versions should just return ~0ull for both overflow and divide by zero. David > > Oleg. >