From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 9602D3FFD for ; Tue, 9 Sep 2025 08:51:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757407888; cv=none; b=uAhCuULcOv9SieyW0NEbsiVNKS5fNNEHwo3vhOvVVDcjw8xy7mYVPQH5ZY9spP8iTDAusTjXEuDYttpsFpKDLRlcS1A37Rf0HZKA5Wf48yZdju8nIhsTZXY1ureNj1LppEfCP8feqBdmDgXLWx4T9cPnx9qFNiYz6q53X32FbfQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757407888; c=relaxed/simple; bh=1i0l57ZqPs+nmk+dFWLjTwKNbcYbY5vaJfjBDNvQmEA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=lNwrwthIdO4+ErhRCLN9wqyKfRlobMK9Qj71lynGaInVHS1oBJYJmo7MnM7ViRqgldkWswa46H480SelZg0494nIdea/EwvU9Ow0CkC3OpIlZW234ryKY3QtHaDVMwfBPB2j22YKxucvAab1EQlwBwUi+ICYDnkNJHzTAtNzG00= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=MbilZubL; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="MbilZubL" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-45df09c7128so2844695e9.1 for ; Tue, 09 Sep 2025 01:51:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1757407885; x=1758012685; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=4BbK4pmT6bYfsuRclAv9tGmENtdvKapeB1KD4zENnxo=; b=MbilZubLP8HGIcUYPayibK3NA2+OCRapfMPZaS3RVouAoOaJ8JYAVT2UiLD/cEBlXp fDqwboQaAWIeZmuCvl8rN8qnVEwfpJkHm9FD+t0my01NFD0zHDLmvJXTFbkCtzwROlFL rYNp/3GA/cwaloArqKEX4MUuiviKkzPpNlu5Ej8nFNmZxLqvKFHOF8zoHBqAcP1FBRHv HLaGpXPtxT5/cXGLu5c+otnFFHooj4uCPaWrIz3739vY62Hxm5+lD73xO/8+WiaZEDB9 ycgqoKLbrVl1bEyCiZ4dFdRWrls/ZsXT953ASXCdnlU3QgXcG2yz/B69zB7J8xAuicIv ePJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757407885; x=1758012685; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4BbK4pmT6bYfsuRclAv9tGmENtdvKapeB1KD4zENnxo=; b=cYh9NJA6+y7q/HH4i9Q31S5/WLUZQjJr6waNWrZqhsaNgibXdXgRaEM6enetOicjbd D97VdeM99EYIBhj8D2++AYWkAZ5htIXqj3rU0fz1hXbdDspQRC9tuG7UCsFkC9xzveVo AoqBCv9t8FnOilRlD0N3w6H+21sddpf8aZgkc2Wwz/l2SLJ2LaukCltY+6kim4N77FCc 1GjIMJKNIFHa8xY4YuOvnJkOYYC56zl00NyUzNXvjfRV0GYBmQMqvWib4qrL7VOA2jge y47ZjS+ZavdCH3I2/5C6L2W96PMPy6imw/oHwCW9Ds4Xf7gSZkv4zbEXoeU7H2+PXz26 QtHQ== X-Forwarded-Encrypted: i=1; AJvYcCUYeoE+IjOWVYc++n0f9j5bRnIF7fcfocM31E3Cd4La3EaXcQX4xcz1IIqpyk4EMB2A2om7Dw4GaGDcZMM=@vger.kernel.org X-Gm-Message-State: AOJu0YwRviE+PLlXHKxREjsG4lCBtpujb+FTv8vaCKfVjQ1a7X+5kFFA po0aHFMaeoVKzK7a+BlJKdgyrLXJbEqn2yD7wbg106eBtiVgEVyBNVjILkzw3evrEy8= X-Gm-Gg: ASbGncugHaHS8ebl/MInHCpoPFqDXr/Bda2EibkFKhYxxOgPLhzDRLUINiPNKEYiic9 d1Ry+YrsloXcPJMZaYM3FZj7ySBfzSt+D4DT9F0YWdQyCB9kpOHBl1GM2Z1fKu9vxZuc3LXYoGV 4N7ORtgP+waZxL8rPk77dEKJ2qU9lk74jBaAETdDNszhpJqJpQOZDFAznsFY/Y0S/Kq7miRyBo9 ILlmgOmVnxerX9DNKZC6Khx6pXMWSPblp4RYph2YHvhJJ1Wt5u4vwqEJS3o5wbfsoXPcqLBEtcw ideTip+mjefZE4JvUeRdUkQ6P2mXX8SMXDApTzBGMb1hEDjIybaE8tje1m1fA/Ym1/TxtYbZid+ nsUy4y8e6Qz9u+xCx/PkjCl4Q347xU/uRZF/156ZRHAojAkhobcNfeoEzyIl5b3q2csC7eAgYhu 2x X-Google-Smtp-Source: AGHT+IGL8x6BwFXjJDJUYELQJ29ZWMfUnWO7dg/5uItdRfaodfdZ4YFnPkvyFInGau3LOLm3pLE8/g== X-Received: by 2002:a05:600c:4746:b0:45c:b642:87a6 with SMTP id 5b1f17b1804b1-45dd5aa03ccmr137829465e9.0.1757407884865; Tue, 09 Sep 2025 01:51:24 -0700 (PDT) Received: from ?IPV6:2001:a61:13f5:7601:eee5:15cd:c3c1:e601? ([2001:a61:13f5:7601:eee5:15cd:c3c1:e601]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3e75223f607sm1727954f8f.51.2025.09.09.01.51.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Sep 2025 01:51:24 -0700 (PDT) Message-ID: <30807256-d5f4-4550-8e1d-aedee05dc667@suse.com> Date: Tue, 9 Sep 2025 10:51:21 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Different approaches to sync timeout: Desktop vs Mobile use cases To: tuhaowen , pavel@kernel.org, rafael@kernel.org Cc: saravanak@google.com, huangbibo@uniontech.com, len.brown@intel.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, wusamuel@google.com References: <20250909071358.5943-1-tuhaowen@uniontech.com> Content-Language: en-US From: Oliver Neukum In-Reply-To: <20250909071358.5943-1-tuhaowen@uniontech.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, On 09.09.25 09:13, tuhaowen wrote: > **Use Case**: Desktop/laptop systems where users expect immediate feedback > **Problem**: When large file operations are in progress (e.g., copying > files to USB drives) and users initiate suspend, ksys_sync() can hang It seems to me like both your approaches seek to mitigate the consequences of the issue rather than solve it. Your issue is that you have too many dirty blocks associated with a slow device. In other words, you should sync and need to limit the number of dirty blocks created after you've started syncing without freezing all of user space. Regards Oliver