Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756640AbbGTVTt (ORCPT ); Mon, 20 Jul 2015 17:19:49 -0400 Received: from v094114.home.net.pl ([79.96.170.134]:44429 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752647AbbGTVTr convert rfc822-to-8bit (ORCPT ); Mon, 20 Jul 2015 17:19:47 -0400 From: "Rafael J. Wysocki" To: Pali =?ISO-8859-1?Q?Roh=E1r?= Cc: Alasdair Kergon , Mike Snitzer , Neil Brown , Len Brown , Pavel Machek , dm-devel@redhat.com, linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH v2 1/3] PM suspend/hibernate: Call notifier after freezing processes Date: Mon, 20 Jul 2015 23:46:32 +0200 Message-ID: <1715416.hWBvT0iLvO@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/4.1.0-rc5+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20150720073226.GB25910@pali> References: <1428254419-7334-1-git-send-email-pali.rohar@gmail.com> <3179448.TScsKEAuyR@vostro.rjw.lan> <20150720073226.GB25910@pali> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1414 Lines: 36 On Monday, July 20, 2015 09:32:26 AM Pali Rohár wrote: > On Saturday 18 July 2015 01:27:15 Rafael J. Wysocki wrote: > > On Thursday, July 16, 2015 09:33:02 AM Pali Rohár wrote: > > > On Thursday 16 July 2015 03:02:03 Rafael J. Wysocki wrote: > > > > Also, if you're adding AFTER_FREEZE, it would be good to add BEFORE_THAW too > > > > for symmetry. > > > > > > > > > > But there is no use case for BEFORE_THAW. At least it is not needed for now. > > > > For your use case, a single function pointer would be sufficient too. > > > > What do you mean by single function pointer? kernel/power is part of > kernel image and dm-crypt is external kernel module. Well, if there is a function pointer in the core suspend code initially set to NULL and exported to modules such that the dm-crypt code can set it to something else, that should be sufficient, shouldn't it? So if you're adding new PM notifier events, that's already more than *you* need. Anyway, I guess the "post freeze" new one should be enough for now, but please change the name to POST_FREEZE. Also I think we don't need separate "post freeze" events for suspend and hibernation. Thanks, Rafael -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/