From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796114565; b=zGHGFQa+2EHGEKYkEAHdRNVscJh8yiO1en+yep+v31nMmPAQYHNFAgVOcYNKx8ZvCIyD mrCa6+5b0y/qc8soLoINtGJ0oZUMDKhM8d2RSz0ODMsqwhKAbrlN6/WFSnoG5hKXzTb08 x+kwZfwLlXiNm1MiFEUZ+xhzVyS/kz/UjSwTDZettsShgD/Vx5nQVV1u5yWbjogldVclA WMp/4OuPDLVg2326mDoxPj01wVwATQKrkYW2gl5WKYSfHDV/Q4kEgNAGdVpiVDRNxhsdI lB8wGHSBGULs89//XsEfBSsTAKBT2/xrYaixMtBG1f90C/UNwNgcwIt4/Z45NqAg1vA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796114565; h=DMARC-Filter:DKIM-Signature:Received:X-MC-Unique: X-Mimecast-MFC-AGG-ID:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received: X-Received:Received:Message-ID:Date:MIME-Version:User-Agent:Subject: Content-Language:To:Cc:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=hORzUkFjN36/LE0rITtSf54kElrNoXEMZuwo2zq/8iw=; b=k9LoljgayvRALMp4onaxPK5uBb17Bxd2HIlBAsk+9HJvveTsviovYByqZFXziEvWZVxU bZzL7b+Mev+fleu1QXMAXVkAik/2CzhLVXbGU27/in5T6/NFQe/fTlLbvUT84qyQvXAlY SD30WDafnplDrjaGNRqfW7BC/flROMRxz7ts8QtFAJuaMkS9ZiNxANQusqoNdhXcQ/E4p 6lSeDJI/EmUz+NQYgUWu9ISyO+6Or/QHsltASFyC66eOmU6rORfvqyBmoNtRfBkSzwRau HcSNwxo5arnJd+EayaK5NU9xPCd0hmpYdQm/9PwuG586kVObbcql3qIOgvfxLZlKDrA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=VLXTBuT8; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=google header.b=YCCM7+gX; arc=none smtp.remote-ip=170.10.129.124 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D340606A31A for ; Tue, 1 Dec 2026 08:42:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9D340606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=VLXTBuT8; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=google header.b=YCCM7+gX DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1796114563; 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=hORzUkFjN36/LE0rITtSf54kElrNoXEMZuwo2zq/8iw=; b=VLXTBuT8F7YJcGJ+vuFCaerKaGWpPmk1Xr2nK0ncXNZQ25iwv9LPcAQcMF+UKfNS+bPQD5 WSUKbOOhcVyTs/xuTWtRzxHA8vmknSu7r51cR5Ke9fTjGzZTzyIxALBg04qjo32Gpt1N1N ElEJ4hCzVKfRS36xG9R31PJODVDsUW4= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-575-15-d-EzVPQaQ1LlT-R-5cQ-1; Tue, 1 Dec 2026 08:42:41 +0000 X-MC-Unique: 15-d-EzVPQaQ1LlT-R-5cQ-1 X-Mimecast-MFC-AGG-ID: 15-d-EzVPQaQ1LlT-R-5cQ_1796114560 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-4a589b28bddso2666119f8f.0 for ; Tue, 01 Dec 2026 00:42:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1796114560; x=1796719360; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=hORzUkFjN36/LE0rITtSf54kElrNoXEMZuwo2zq/8iw=; b=YCCM7+gXMxs8pfHLXF1JRqGnCBoZw3ci+DPyeuxgn6Ji+81VIXB5XBCW9h1qGVq1hL yB/ESqLxnGqAr13aE3NUVHPY+pObNoVwsvKMjKIK32hEEiHnptDGl3O//Wql2wYACvnL wRcyDfmoSrj1He1BedLBoHCQs0g+zvArtxiDxPxKL7nQc4qor9lf/bFvtiCHfsoSIAZK PQcHuuyDA6SmjMWbypGTvqXVPRYa1U4jECAHpJuTDW5I/aT3JcK6alJJd++3PcowhfRD PjPPxM2sYh1b3NSYVbI4+OrSAuWCjtaG0ap1QyXsEAOCIGKqOlU4Nj4wXJNPi5tQLQYM ISPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796114560; x=1796719360; h=content-transfer-encoding:content-type:in-reply-to:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=hORzUkFjN36/LE0rITtSf54kElrNoXEMZuwo2zq/8iw=; b=vAozyIqws5ZpFhtHpZ30aFU/tVqwNruceKrozkcEe9IThELWWvFwOYO6VSWcfyuA4J lzDVgPNa/THpfBHJErX2a4X5MvC3BMDsGCwUqHw/WMo5ufT6WmNTfQb51YQHPlgl81E7 q8D9gYF88iTNAMbvmR6Ru8UPr823IjALLV0MhYUwZLe6jftxjjI/xnT1YFOMcDw9dvdL cePhYyhwDKZw5GwYP3wC+ra+AKp8YyEBlZLJtjemC2b0insYgPYLwuA5BkO5SkUupcf5 lsjesTV+CCECrC5GcAvpIAaBK3n3m9gAp8zkokH0iZIy2uX7W54JWpBK1UFJKrFO++vF aCfg== X-Forwarded-Encrypted: i=1; AL+hErH2OF9du4kvX6mg0WpQGZp1Nfchyh6Wy37+m/ca3/qh4aO/K67mIBefWeETZuACpuhz/K7wNcTLf2PWy+0=@vger.kernel.org X-Gm-Message-State: APuU4Z8fWF5Bi7vhFFAduhRc3R30aINsuk+WAgahqQPoysz6pOa4t0xF gBDLFFq/F6+gfpphcQG8hxeUhmBfdHt1Bhh+JiD7PuquU+um0zLl0vApnCMS1TAFzB9jBOeEjui 9lT5O0Drtu1CWg5/YvzzP5VmHGD3yezp2eZJZqvhdwUMj34Kp9m5XbXWCzu+7yQtkOQ== X-Gm-Gg: AZFdTZeuGqMxpaRyYfwkVcZMvG21o82/K4dyU1efiZ+zdIhtpfNyuFvaVdKKFIKpJS+ z196Tdo86zRVzBm1PKQkoFIFOuYWOU0RpYStpIHbFfvjnw7NcATL0LH9RtTfUMNnX1xMtlxm/LH x8quwxrTqutfbFMy4tCZN/t2CzL2Zy8sxG8ec9T0R+cVzzkcIxsvK/86L3JRA8GDqjv0fnLtyg3 Av0dBAO2gerOeaAlBldG8OjYeMrzYrPg20t5w/dF9dS3xjDZbEo+ThVbbrP60mc48uFGFjEseD+ nbS9PBlyIQZyz5hoYyrzYamTDcX//Bk+vyMWuOCZCp4zhuls+yXlRlCUEy3kf793I510UK5Tt66 IiDKk2cC9owp2+Gs3/kuHzT6wkbkHvkt2w+zYntT/cIlzhg== X-Received: by 2002:a05:600c:3b9e:b0:4a1:cf60:dcc3 with SMTP id 5b1f17b1804b1-4bb88820687mr828088485e9.29.1796114560403; Tue, 01 Dec 2026 00:42:40 -0800 (PST) X-Received: by 2002:a05:600c:3b9e:b0:4a1:cf60:dcc3 with SMTP id 5b1f17b1804b1-4bb88820687mr828087875e9.29.1796114559939; Tue, 01 Dec 2026 00:42:39 -0800 (PST) Received: from [192.168.2.75] ([46.175.183.46]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb8533579csm845435905e9.2.2026.12.01.00.42.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Dec 2026 00:42:39 -0800 (PST) Message-ID: Date: Tue, 1 Dec 2026 09:42:38 +0100 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net v2] dpll: zl3073x: do not block DPLL callbacks while PTP ops wait Content-Language: en-US To: Ivan Vecera , netdev@vger.kernel.org Cc: Min Li , Vadim Fedorenko , Arkadiusz Kubalewski , Jiri Pirko , Richard Cochran , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org References: <20261125154245.205758-1-ivecera@redhat.com> From: Petr Oros In-Reply-To: <20261125154245.205758-1-ivecera@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/25/26 4:42 PM, Ivan Vecera wrote: > The PTP clock operations hold the channel lock while they wait for the > device: up to 1 s for a pending ToD write to be applied on the next > 1 Hz edge, up to 1 s for a previous TIE write and up to 3 s for a > previous output phase step. The DPLL callbacks and the periodic state > check of the channel take the same lock, so they wait as well. The DPLL > callbacks wait under the global dpll_lock, which stalls the requests > for all DPLL devices in the system. > > On a GNR-D system with a ZL30732, device-get requests for both DPLL > channels and for a DPLL device of ice took 950 ms in median while > settime() ran in a loop on the PTP clock of channel 0, and 2955 ms > while adjtime() did output phase steps in NCO mode. With this change > they take 2 ms in both cases. > > Only the PTP clock operations use the ToD, TIE and phase step > registers. They need the channel lock only for the channel mode and > the list of output pins. > > Serialize the PTP clock operations with a new per-channel ptp_lock and > take the channel lock only to read the mode and the output pins and to > issue a TIE write or the first phase step of an adjustment, which also > steps the ToD. Wait for the previous TIE write or phase step before > taking the channel lock, with tie_lock or phase_step_lock held, and > check the mode again under it, so they are issued only in a mode that > supports them. The phase steps for the other synthesizers move only > the outputs and are issued in any mode, so all outputs get the same > step even if the channel leaves NCO mode meanwhile. The lock order is > ptp_lock, then tie_lock or phase_step_lock, then the channel lock. > Reviewed-by: Petr Oros