lkml.org 
[lkml]   [2006]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH/RFC] s390: Hypervisor File System
    From
    Date
    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.


    -
    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/

    \
     
     \ /
      Last update: 2006-04-21 18:43    [W:0.022 / U:1.064 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site