public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Michael Holzheu <HOLZHEU@de.ibm.com>,
	linux-kernel@vger.kernel.org, mschwid2@de.ibm.com,
	penberg@gmail.com
Subject: Re: [PATCH/RFC] s390: Hypervisor File System
Date: Fri, 21 Apr 2006 18:40:29 +0200	[thread overview]
Message-ID: <1145637630.6884.7.camel@localhost> (raw)
In-Reply-To: <1145633898.13191.9.camel@localhost>

On Fri, 2006-04-21 at 18:38 +0300, Pekka Enberg wrote:
> Hi Michael,
> 
> On Fri, 2006-04-21 at 16:08 +0200, Michael Holzheu wrote:
> > The first one was, that the hardware interface for getting the data is
> > very expensive. We always get back the data for all LPARs and all
> > cpus. Therefore we do not want to get the data every time an attribute
> > file is read.
> 
> You can cache the results in userspace. So I don't see this one as an
> argument for making the kernel more complex.

Unfortunately we can't cache them in user-space. To read a file you do
open/read/close an the attributes you are interested in. If we do not
cache the content of the attributes in the kernel we have to issue a
diag204 for each open/read/close sequence. But the data that is deliverd
by diag204 will have changed between the two calls. In addition the
number of active lpars and the lpar names might have changed.

> On Fri, 2006-04-21 at 16:08 +0200, Michael Holzheu wrote:
> > The second problem was, that we want to provide a consistent snapshot
> > of the hypervisor data for the user space application.
> 
> How do you ensure consistency now? And how is that different from an
> userspace process reading the whole directory hierarchy into cache in
> one go?

We ensure the consistency by the following sequence:
1) read the update attribute to get the timestamp of the last update
2) decide if the data is new enough, if it is to old write something to
the update attribute and restart with 1)
3) read the information you are interested in
4) read the update attribute again and compare it with the one read in
step 1). If the timestamp has changed restart the whole thing with 1)

> The update-on-write to special file thing seems bit strange to me. What
> if two processes ask for it at the same time?

Yes, we had that discussion as well. Any sensible suggestion how to do
it in a more clever way would be greatly appreciated. We haven't found
something better so far.

-- 
blue skies,
  Martin.

Martin Schwidefsky
Linux for zSeries Development & Services
IBM Deutschland Entwicklung GmbH

"Reality continues to ruin my life." - Calvin.



  reply	other threads:[~2006-04-21 16:40 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-21 11:35 [PATCH/RFC] s390: Hypervisor File System Michael Holzheu
2006-04-21 11:53 ` Pekka Enberg
2006-04-21 13:56   ` Michael Holzheu
2006-04-21 14:55     ` Arnd Bergmann
2006-04-21 15:31       ` Michael Holzheu
2006-04-21 13:32 ` Pekka Enberg
2006-04-21 14:08   ` Michael Holzheu
2006-04-21 15:38     ` Pekka Enberg
2006-04-21 16:40       ` Martin Schwidefsky [this message]
2006-04-25 14:04         ` Pekka Enberg
2006-04-21 14:42 ` Pekka Enberg
2006-04-21 14:59   ` Michael Holzheu
2006-04-21 15:41     ` Pekka Enberg
2006-04-21 15:18   ` Jörn Engel
2006-04-21 15:36     ` Michael Holzheu
2006-04-21 15:46       ` Jörn Engel
2006-04-21 22:30   ` Ingo Oeser
2006-04-24 17:17     ` Michael Holzheu
2006-04-24 19:57       ` Ingo Oeser
2006-04-25  6:27       ` Pekka Enberg
2006-04-24 17:19   ` Michael Holzheu
  -- strict thread matches above, loose matches on Subject: below --
2006-04-24 17:19 Michael Holzheu
2006-04-25  6:58 ` Pekka Enberg
2006-04-25  7:32   ` Pekka Enberg
2006-04-25  7:47     ` Andrew Morton
2006-04-25  8:01       ` Pekka Enberg
2006-04-25  8:52     ` Jörn Engel
2006-04-25  9:00       ` Pekka Enberg
2006-04-25 12:22     ` Michael Holzheu
2006-04-25 14:33 ` Pekka Enberg
2006-04-25 14:45   ` Jörn Engel
2006-04-26  9:30   ` Michael Holzheu

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=1145637630.6884.7.camel@localhost \
    --to=schwidefsky@de.ibm.com \
    --cc=HOLZHEU@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mschwid2@de.ibm.com \
    --cc=penberg@cs.helsinki.fi \
    --cc=penberg@gmail.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