From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) (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 6CAD22FD69E for ; Fri, 10 Jul 2026 16:27:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783700872; cv=none; b=Qt2+et3M9mcZTxrRKWVa50Axv4AYehY+ZCpTNZFwR0kgdmh4W/mCppsQSaqY0CkpSdRgsh9UEFSpm5WvFpolI84xQWHv/iM445v5kz+hi1VJLMP0EJbCDvNLgrdumfIrTrOrmkTeVB/vARJkwX+ivqjKLXfqFiyKiWoRlgJmxT0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783700872; c=relaxed/simple; bh=zFHfJ1sc06mEROvkctmUCy8ljGsoiIWpsgO49VU7hjE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KmB+57aWwfzCMD74r0TrW0Jr/XlXAQYNRPnc+GMxNZddNNeaQiWAsdYNelJrHF0fweL16/kZN+X78d/4WdSXfgCy+Q4KcWVSSZzBHCh+cxj5G0JF+Si+F+1ti4cYMa3TPCeW+xTqQLYuzK1vuXYGGV/39y5C2lHex+y0Z1QQCZw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=kzWtCM71; arc=none smtp.client-ip=209.85.219.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="kzWtCM71" Received: by mail-qv1-f46.google.com with SMTP id 6a1803df08f44-8ff88549786so10835716d6.3 for ; Fri, 10 Jul 2026 09:27:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1783700870; x=1784305670; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=UNIXCm8Zus/z4nQ3xLBTLCwOawMM/+5sDMMsd2dm66E=; b=kzWtCM71+HYvSg5oE26kEeUnwihq3A/acXX4BVp3dJc4iGnjTsKQa4fnDYBQ6pBk5b 29P7+Ypob7sR/qVJoC4xvQRlyVPCMjusy4b039Vp+MK0tL862RkeqyZhehuW4fn6jBFg BjxPS2nXse00VxL/pgQkm6gJ4jdEQwmI73lDyKnZGowzDZmOCSL17+P5Ktrf+fL6mmzf zxy6NhAvixXcWArIhMEK+//tQhuCNzrhiieoCnSaFt3Czfuu+cqU5kw81pvl3qkEYBbL S7JSGCUqPHUb7lYX8lvUJynDgusxrNxM7CH2DQtYQy3HkWF8djnbgx0z0K5075l4UiLM NK8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783700870; x=1784305670; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=UNIXCm8Zus/z4nQ3xLBTLCwOawMM/+5sDMMsd2dm66E=; b=DV6ae8x7IvH/FcTj4xbJcCwSZ1PESHCAYKL4p2I6a1rcWkfzyM+JRBCsvBMNafCa+7 LrcRzGyDxpIUJsnBUjF8Be0624LP5WiB/HwShZtEtFRMZpg4I3gLIMNhAWOlL6LdJEPu vmLgNnaaWi5t3yxXRKTGtboukpupTQcsak8U4/tMWAcGL524SOL1/ThgGviOEh512Yjv i2t6MxDLPIKULW5kIipF6OBlioZr57FrtRC6Gbio7Rfc4oPxD4VHSCPJ7hY32m0+Wqa8 O2SzC6D4q+nljZ8cAYuUStjFEYLKie27tP3u88Bepf4B0cdjaguY0Qr51RGKvBy9Lxiq 9TSA== X-Forwarded-Encrypted: i=1; AHgh+RpQBdiV2cNTq85hKZooqmOQApcBSa6RBjB9Booq2pH+CodNfdwEaP8iDEoA/9Jo+cMpo4FaBfrZQtNnf1w=@vger.kernel.org X-Gm-Message-State: AOJu0Yz5SeFr0l5V0NIxzPw0v7E0hyluBla+Ki7+aIEkzIF75aNOnTdz IMlRAuG6DYkz5yYL2v2OOVzZ62eSE6uss8VHmcmIFCsDu2ixc/2jLigg3TQVbOIEK6U= X-Gm-Gg: AfdE7clJi/JEnMBUt19ud3aoOVPvFG+LnEBmouIHzi4kyTh2AF1/Rffuy3Udf1j34Uc 9RSD7u/dnBrrCmE7fca3YxeI9jmnmjxRHQB2j/dq1b49LaSJqAU3nE6yb2WxJ8Dxd/cB9YChOla dqQ1BLunRHtjOEIrQ6ftw+MGoWco7mOmEAVSJNl5pJL46T+aXw2wqgakm0clKZMriOnCo+7+bBJ HrthrwT46kLipCF273MGh3hA/w0hfNci8jmTifRbKYx57sq7hCUhTY5UtNLcnZU10BE8GUjjUIv 5gkXimD7+v3ridWyrU2XzKR2s5udbmCdeGgjkpcFs0pHPJKC736HwZ85MoVUQ+9O9tFokdusngN wO+74KHLeZtYfwC3vU6fMLQArvquYMX5QDjjHYUgWWcDBKkY5g8gfBBhCHQrQjaJbRcpgmMg= X-Received: by 2002:a05:6214:2127:b0:8f5:eea1:6f04 with SMTP id 6a1803df08f44-8fec3522cffmr120531466d6.54.1783700870475; Fri, 10 Jul 2026 09:27:50 -0700 (PDT) Received: from ziepe.ca ([159.2.72.92]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8ffd50e081dsm44781476d6.9.2026.07.10.09.27.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2026 09:27:49 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1wiE4r-00000007XPF-1WDC; Fri, 10 Jul 2026 13:27:49 -0300 Date: Fri, 10 Jul 2026 13:27:49 -0300 From: Jason Gunthorpe To: Stanislav Kinsburskii Cc: airlied@gmail.com, akhilesh@ee.iitb.ac.in, akpm@linux-foundation.org, corbet@lwn.net, dakr@kernel.org, david@kernel.org, decui@microsoft.com, haiyangz@microsoft.com, kees@kernel.org, kys@microsoft.com, leon@kernel.org, liam@infradead.org, lizhi.hou@amd.com, ljs@kernel.org, longli@microsoft.com, lyude@redhat.com, maarten.lankhorst@linux.intel.com, mamin506@gmail.com, mhocko@suse.com, mripard@kernel.org, nouveau@lists.freedesktop.org, ogabbay@kernel.org, oleg@redhat.com, rppt@kernel.org, shuah@kernel.org, simona@ffwll.ch, skhan@linuxfoundation.org, surenb@google.com, tzimmermann@suse.de, vbabka@kernel.org, wei.liu@kernel.org, dri-devel@lists.freedesktop.org, linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-rdma@vger.kernel.org Subject: Re: [PATCH v7 2/8] mm/hmm: add hmm_range_fault_unlocked_timeout() for mmap lock-drop support Message-ID: <20260710162749.GP118978@ziepe.ca> References: <178345345668.660027.2952911919681614557.stgit@skinsburskii> <178345362182.660027.12809852179204464964.stgit@skinsburskii> Precedence: bulk X-Mailing-List: linux-hyperv@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <178345362182.660027.12809852179204464964.stgit@skinsburskii> On Tue, Jul 07, 2026 at 12:47:01PM -0700, Stanislav Kinsburskii wrote: > +int hmm_range_fault_unlocked_timeout(struct hmm_range *range, > + unsigned long timeout) > +{ > + struct mm_struct *mm = range->notifier->mm; > + unsigned long deadline = 0; > + int locked, ret; > + > + if (timeout) > + deadline = jiffies + timeout; > + > + do { > + if (fatal_signal_pending(current)) > + return -EINTR; > + > + if (timeout && time_after(jiffies, deadline)) > + return -EBUSY; I really dislike there is a timeout here, HMM is supposed to be more deterministic. GUP doesn't have a timeout, what is this about? Jason