Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1427984ybt; Thu, 18 Jun 2020 08:27:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx43DtiOYDg6auvN78MhDFLeHb/TmRm49v6n7trfh0G6iiXkDchpZjtTFL+WjFOZCTqD6+k X-Received: by 2002:a05:6402:897:: with SMTP id e23mr4649339edy.217.1592494026452; Thu, 18 Jun 2020 08:27:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592494026; cv=none; d=google.com; s=arc-20160816; b=yye3djQgODBjnIhIGNByjtIhJ5yHRh68gw5U2qe1Lad4m+TPJKC+uLrQBtbqaBSgQ2 zzpcfIWlPOtQVW1TGbhLLfYdWVsvuXi6oMvJmtYgqMtfbIhpH17+KZsymgjNn2w7jipB SUh6RS9TFGUfSYtY5LpotpdE/K+Ikxg2diYe/CLGDZnEzuZjz7oLa5W2wldIB5yl5j5+ 9MLBYaewoVuyrk+4d5hwR+fGsfrDWSIubizCqCytZmCRqDniDwRXt/pA9Xic+bz9pXxf Fp2cZ8kgAdZDVnI70Tx3tKiN2E2nqpAAVRtpUZr3Ov490r+koq2bYQ+/4nh8uPcalvda 1JFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=ZNoqRPw3UvDcF+Rzsimtu2GK82CnXwvp0FPvlYQpdcw=; b=ldM1CGJ+5NpdYPnhVqx9cdAJWTPINTkL2TEs2c0MiBmbKsZkjo5vN5IHDSVsHWywg4 lLGdqQ7QKhKKsfl1W9ZP2rclQQ38MrYzSOjj++FTw4H+CkR9+VY0YpJKJhC/xPxceB3Q VSP3PgJeqtJwGF85tNxdp86JsvAGt2HeOGTmIdNYCpQwKYzDV+RuCCEFniiBEKrqQvAc WG96NqY/SVoJnSvcOPK0SZj3bpWtpvjjgFQ46N1Ammu/seAIOL4qtQ/YQjaBKa0CFLS4 eJQDA69t9MV78pd2eyqUPZD/07DbO6+/LXyusnmshJovNY6k4+5/WMVegURniLw+suZe m2SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=1PnIVNDx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y14si2081848edo.315.2020.06.18.08.26.43; Thu, 18 Jun 2020 08:27:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=1PnIVNDx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729882AbgFRPWB (ORCPT + 99 others); Thu, 18 Jun 2020 11:22:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727045AbgFRPWA (ORCPT ); Thu, 18 Jun 2020 11:22:00 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86643C06174E for ; Thu, 18 Jun 2020 08:22:00 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id s23so2925923pfh.7 for ; Thu, 18 Jun 2020 08:22:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ZNoqRPw3UvDcF+Rzsimtu2GK82CnXwvp0FPvlYQpdcw=; b=1PnIVNDxQSN5j5vrmKWmjKk5kmBqH85AaE3s5U5t0oCc6NdMfCY9HGEUX9pFwul3y+ +BHcqOAc2kIIMm4anvzwmyeKM6Vyn+9+nHejZ54qkAmtG+4kQzhmfdmIvRrakDqzHjM4 LOv1PCOCm7exPrzOFJ2VkvZKN8pRb2/+DRlrtGqBPz1zx+pMMWDipwptcrMwa5jR1tm7 6KgM3GDBgxH0Zm94UZMMXxprukIDJc3e2SakoOLLYAgfOaGliP4OhTxFP7/Nc3iYGUyB ivlANUrW0TnpA51kn+i5bycaWBWO3zsJ8mX5IR1vkRWtCXPkiKT7ubnP8F74Le0GVxoL 6z/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ZNoqRPw3UvDcF+Rzsimtu2GK82CnXwvp0FPvlYQpdcw=; b=il8ll3Q2HNI3IFP2qyGU2vixLutjwIaZDzaG/OaTVHnePr9ogZNN5cAECXhkWwgFjk 3yGAUlyVXXZ7V3C3qofcRWDQAw2umrwFefKtxhWc81dqdmHEnhPscln+vMMGxsIEqW05 ERSnh0v/f0gz8WS8gcp49pyIDyLvCr4rIQGwYDz/QkbG7bVWuvKLkQR/aCIXJTdqdQem V/qLb1OXAWPtCWh1f7T8zXT5F7iJQBoJdGR90W9ec7GD/pMKFmWdT73MxwLC7DW+Yxvj xaep/KBcFx1AO3AD5Elt8DqoGOPeSO7NhheoRw5NvU4w2K8gLZe7CNY0I9n+J96w0Sd3 45rQ== X-Gm-Message-State: AOAM530D2h8B4GMpMX+SXrnHrYKxkUM/wRegnqILrhTQ+7FYU+NxSRTV EIVntxgykkben+D58k95bPaAuOGz9yBjVA== X-Received: by 2002:a63:7d4e:: with SMTP id m14mr3829316pgn.391.1592493719358; Thu, 18 Jun 2020 08:21:59 -0700 (PDT) Received: from [192.168.1.159] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id j123sm3283831pfd.160.2020.06.18.08.21.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Jun 2020 08:21:58 -0700 (PDT) Subject: Re: [PATCH v3] libata: Use per port sync for detach To: Kai-Heng Feng Cc: John Garry , "open list:LIBATA SUBSYSTEM (Serial and Parallel ATA drivers)" , open list References: <20200603074819.21639-1-kai.heng.feng@canonical.com> From: Jens Axboe Message-ID: <88430982-e948-be34-b47b-2411b31eb187@kernel.dk> Date: Thu, 18 Jun 2020 09:21:57 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200603074819.21639-1-kai.heng.feng@canonical.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/3/20 1:48 AM, Kai-Heng Feng wrote: > Commit 130f4caf145c ("libata: Ensure ata_port probe has completed before > detach") may cause system freeze during suspend. > > Using async_synchronize_full() in PM callbacks is wrong, since async > callbacks that are already scheduled may wait for not-yet-scheduled > callbacks, causes a circular dependency. > > Instead of using big hammer like async_synchronize_full(), use async > cookie to make sure port probe are synced, without affecting other > scheduled PM callbacks. Queued up for 5.8, thanks. -- Jens Axboe