linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KY Srinivasan <kys@microsoft.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: Michal Hocko <mhocko@suse.cz>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
	"olaf@aepfle.de" <olaf@aepfle.de>,
	"apw@canonical.com" <apw@canonical.com>,
	"andi@firstfloor.org" <andi@firstfloor.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"kamezawa.hiroyuki@gmail.com" <kamezawa.hiroyuki@gmail.com>,
	"hannes@cmpxchg.org" <hannes@cmpxchg.org>,
	"yinghan@google.com" <yinghan@google.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	"kay@vrfy.org" <kay@vrfy.org>
Subject: RE: [PATCH 1/1] Drivers: base: memory: Export symbols for onlining memory blocks
Date: Tue, 23 Jul 2013 17:21:08 +0000	[thread overview]
Message-ID: <9f351a549e76483d9148f87535567ea0@SN2PR03MB061.namprd03.prod.outlook.com> (raw)
In-Reply-To: <51EEA89F.9070309@intel.com>



> -----Original Message-----
> From: Dave Hansen [mailto:dave.hansen@intel.com]
> Sent: Tuesday, July 23, 2013 12:01 PM
> To: KY Srinivasan
> Cc: Michal Hocko; gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org;
> devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com;
> andi@firstfloor.org; akpm@linux-foundation.org; linux-mm@kvack.org;
> kamezawa.hiroyuki@gmail.com; hannes@cmpxchg.org; yinghan@google.com;
> jasowang@redhat.com; kay@vrfy.org
> Subject: Re: [PATCH 1/1] Drivers: base: memory: Export symbols for onlining
> memory blocks
> 
> On 07/23/2013 08:54 AM, KY Srinivasan wrote:
> >> > Adding memory usually requires allocating some large, contiguous areas
> >> > of memory for use as mem_map[] and other VM structures.  That's really
> >> > hard to do under heavy memory pressure.  How are you accomplishing this?
> > I cannot avoid failures because of lack of memory. In this case I notify the host
> of
> > the failure and also tag the failure as transient. Host retries the operation after
> some
> > delay. There is no guarantee it will succeed though.
> 
> You didn't really answer the question.
> 
> You have allocated some large, physically contiguous areas of memory
> under heavy pressure.  But you also contend that there is too much
> memory pressure to run a small userspace helper.  Under heavy memory
> pressure, I'd expect large, kernel allocations to fail much more often
> than running a small userspace helper.

I am only reporting what I am seeing. Broadly, I have two main failure conditions to
deal with: (a) resource related failure (add_memory() returning -ENOMEM) and (b) not being
able to online a segment that has been successfully hot-added. I have seen both these failures
under high memory pressure. By supporting "in context" onlining, we can eliminate one failure
case. Our inability to online is not a recoverable failure from the host's point of view - the memory
is committed to the guest (since hot add succeeded) but is not usable since it is not onlined.
> 
> It _sounds_ like you really want to be able to have the host retry the
> operation if it fails, and you return success/failure from inside the
> kernel.  It's hard for you to tell if running the userspace helper
> failed, so your solution is to move what what previously done in
> userspace in to the kernel so that you can more easily tell if it failed
> or succeeded.
> 
> Is that right?

No; I am able to get the proper error code for recoverable failures (hot add failures
because of lack of memory). By doing what I am proposing here, we can avoid one class
of failures completely and I think this is what resulted in a better "hot add" experience in the
guest.

K. Y 
> 
> 



--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2013-07-23 17:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-19 19:23 K. Y. Srinivasan
2013-07-22  3:16 ` Jason Wang
2013-07-22 12:37 ` Michal Hocko
2013-07-23 14:52   ` KY Srinivasan
2013-07-23 15:09     ` Michal Hocko
2013-07-23 15:50       ` KY Srinivasan
2013-07-23 15:28     ` Dave Hansen
2013-07-23 15:54       ` KY Srinivasan
2013-07-23 16:00         ` Dave Hansen
2013-07-23 17:21           ` KY Srinivasan [this message]
2013-07-24 16:43             ` Dave Hansen
2013-07-24 19:45               ` KY Srinivasan
2013-07-24 21:02                 ` Dave Hansen
2013-07-25  7:57                   ` Michal Hocko
2013-07-25 11:14                     ` KY Srinivasan
2013-07-25 15:03                       ` Dave Hansen
2013-07-25 15:15                         ` Kay Sievers
2013-07-25 16:35                           ` Dave Hansen
2013-07-25 15:49                         ` KY Srinivasan
2013-07-23 16:01 ` Greg KH
2013-07-23 16:54   ` KY Srinivasan

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=9f351a549e76483d9148f87535567ea0@SN2PR03MB061.namprd03.prod.outlook.com \
    --to=kys@microsoft.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=apw@canonical.com \
    --cc=dave.hansen@intel.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=jasowang@redhat.com \
    --cc=kamezawa.hiroyuki@gmail.com \
    --cc=kay@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    --cc=olaf@aepfle.de \
    --cc=yinghan@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox