[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tmpfs: keep a reference to memory objects

From: olafBuddenhagen
Subject: Re: [PATCH] tmpfs: keep a reference to memory objects
Date: Wed, 19 May 2010 10:37:21 +0200
User-agent: Mutt/1.5.19 (2009-01-05)


On Tue, May 18, 2010 at 04:21:14PM +0200, Sergio Lopez wrote:

> This patch modifies tmpfs to keep a reference (by mapping it into its
> own space) to each memory object created by the user, so they don't get
> inmediately terminated at the end of the current operation.

Hm... Do I get it right, that when the client closes a file (or
otherwise drops the mapping), the object holding the data was getting
lost? Ouch...

(The comment in the code says something slightly different though. So it
doesn't happen immediately, only when cleaning the cache?)

> @@ -489,7 +491,7 @@
>      {
>        error_t err = default_pager_object_create (default_pager,
>                                                &np->dn->u.reg.memobj,
> -                                              np->allocsize);
> +                                              vm_page_size);
>        if (err)
>       {
>         errno = err;

Hm... This change doesn't look like it's related to the issue you
described above... Am I missing something, or did you sneak in an
unrelated fix here? ;-)

> @@ -500,6 +502,13 @@
>        past the specified size of the file.  */
>        err = default_pager_object_set_size (np->dn->u.reg.memobj,
>                                          np->allocsize);
> +      assert_perror (err);

Again, seems unrelated?...

> +      /* XXX we need to keep a reference to the object, or GNU Mach
> +      could try to terminate it while cleaning object cache */

Why the XXX? Do you think this should be fixed another way in the long run?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]