All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: Jan-Bernd Themann <ossthema@de.ibm.com>
Cc: Thomas Klein <tklein@de.ibm.com>, Jeff Garzik <jeff@garzik.org>,
	Jan-Bernd Themann <themann@de.ibm.com>,
	netdev <netdev@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-ppc <linuxppc-dev@ozlabs.org>,
	Christoph Raisch <raisch@de.ibm.com>,
	Marcus Eder <meder@de.ibm.com>
Subject: Re: [PATCH 2/2] ehea: add memory remove hotplug support
Date: Tue, 05 Feb 2008 10:14:21 +1100	[thread overview]
Message-ID: <1202166861.7672.11.camel@concordia> (raw)
In-Reply-To: <200802041624.31228.ossthema@de.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1706 bytes --]


On Mon, 2008-02-04 at 16:24 +0100, Jan-Bernd Themann wrote:
> On Monday 04 February 2008 15:46, Michael Ellerman wrote:
> > On Mon, 2008-02-04 at 14:04 +0100, Jan-Bernd Themann wrote:
> > > Add memory remove hotplug support
> 
> > > @@ -3559,6 +3578,10 @@ int __init ehea_module_init(void)
> > >  	if (ret)
> > >  		ehea_info("failed registering reboot notifier");
> > >  
> > > +	ret = register_memory_notifier(&ehea_mem_nb);
> > > +	if (ret)
> > > +		ehea_info("failed registering memory remove notifier");
> > > 
> > >  	ret = crash_shutdown_register(&ehea_crash_handler);
> > >  	if (ret)
> > >  		ehea_info("failed registering crash handler");
> > 
> > You don't do anything except print a message if the registration fails.
> > What happens when someone tries to remove memory but the memory notifier
> > wasn't registered properly? Bang?
> 
> In case the registration fails and somebody tries to free memory:
> - Driver will not remove the affected memory from the eHEA memory region
>   --> Firmware (phyp) can not free that memory (as marked as used)
>   --> Therefore the removed memory could not be used in an other partition
> 
> It makes sense to allow the driver to work anyway. Having no ethernet
> would not really be a good alternative.

Yeah I agree. I wasn't clear from the patch that no notifier -> no
memory removed. Rather than, no notifier -> memory removed and ehea
isn't told about it.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Michael Ellerman <michael@ellerman.id.au>
To: Jan-Bernd Themann <ossthema@de.ibm.com>
Cc: Jeff Garzik <jeff@garzik.org>, Thomas Klein <tklein@de.ibm.com>,
	Jan-Bernd Themann <themann@de.ibm.com>,
	netdev <netdev@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-ppc <linuxppc-dev@ozlabs.org>,
	Christoph Raisch <raisch@de.ibm.com>,
	Marcus Eder <meder@de.ibm.com>
Subject: Re: [PATCH 2/2] ehea: add memory remove hotplug support
Date: Tue, 05 Feb 2008 10:14:21 +1100	[thread overview]
Message-ID: <1202166861.7672.11.camel@concordia> (raw)
In-Reply-To: <200802041624.31228.ossthema@de.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1706 bytes --]


On Mon, 2008-02-04 at 16:24 +0100, Jan-Bernd Themann wrote:
> On Monday 04 February 2008 15:46, Michael Ellerman wrote:
> > On Mon, 2008-02-04 at 14:04 +0100, Jan-Bernd Themann wrote:
> > > Add memory remove hotplug support
> 
> > > @@ -3559,6 +3578,10 @@ int __init ehea_module_init(void)
> > >  	if (ret)
> > >  		ehea_info("failed registering reboot notifier");
> > >  
> > > +	ret = register_memory_notifier(&ehea_mem_nb);
> > > +	if (ret)
> > > +		ehea_info("failed registering memory remove notifier");
> > > 
> > >  	ret = crash_shutdown_register(&ehea_crash_handler);
> > >  	if (ret)
> > >  		ehea_info("failed registering crash handler");
> > 
> > You don't do anything except print a message if the registration fails.
> > What happens when someone tries to remove memory but the memory notifier
> > wasn't registered properly? Bang?
> 
> In case the registration fails and somebody tries to free memory:
> - Driver will not remove the affected memory from the eHEA memory region
>   --> Firmware (phyp) can not free that memory (as marked as used)
>   --> Therefore the removed memory could not be used in an other partition
> 
> It makes sense to allow the driver to work anyway. Having no ethernet
> would not really be a good alternative.

Yeah I agree. I wasn't clear from the patch that no notifier -> no
memory removed. Rather than, no notifier -> memory removed and ehea
isn't told about it.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2008-02-04 23:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-04 13:04 [PATCH 2/2] ehea: add memory remove hotplug support Jan-Bernd Themann
2008-02-04 13:04 ` Jan-Bernd Themann
2008-02-04 14:46 ` Michael Ellerman
2008-02-04 14:46   ` Michael Ellerman
2008-02-04 15:24   ` Jan-Bernd Themann
2008-02-04 15:24     ` Jan-Bernd Themann
2008-02-04 23:14     ` Michael Ellerman [this message]
2008-02-04 23:14       ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1202166861.7672.11.camel@concordia \
    --to=michael@ellerman.id.au \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=meder@de.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=ossthema@de.ibm.com \
    --cc=raisch@de.ibm.com \
    --cc=themann@de.ibm.com \
    --cc=tklein@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.