bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH] libdiskfs: remove code counting cache misses


From: Samuel Thibault
Subject: Re: [PATCH] libdiskfs: remove code counting cache misses
Date: Mon, 29 Sep 2014 18:35:11 +0200
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Justus Winter, le Mon 29 Sep 2014 16:19:26 +0200, a écrit :
> * libdiskfs/lookup.c (cache_misses): Remove.
> (cm_lock): Likewise.
> (diskfs_lookup): Do not count cache misses.

Ack.

> ---
>  libdiskfs/lookup.c | 31 -------------------------------
>  1 file changed, 31 deletions(-)
> 
> diff --git a/libdiskfs/lookup.c b/libdiskfs/lookup.c
> index bc2ad01..486fedc 100644
> --- a/libdiskfs/lookup.c
> +++ b/libdiskfs/lookup.c
> @@ -21,17 +21,6 @@
>  #include "priv.h"
>  #include <string.h>
>  
> -static struct
> -{
> -  int present;
> -  int absent;
> -  int errors;
> -  int dot;
> -  int dotdot;
> -} cache_misses;
> -static pthread_spinlock_t cm_lock = PTHREAD_SPINLOCK_INITIALIZER;
> -
> -
>  /* Lookup in directory DP (which is locked) the name NAME.  TYPE will
>     either be LOOKUP, CREATE, RENAME, or REMOVE.  CRED identifies the
>     user making the call.
> @@ -175,26 +164,6 @@ diskfs_lookup (struct node *dp, const char *name, enum 
> lookup_type type,
>    else
>      {
>        err = diskfs_lookup_hard (dp, name, type, np, ds, cred);
> -
> -      pthread_spin_lock (&cm_lock);
> -      if (type == LOOKUP)
> -     {
> -       if (err == ENOENT)
> -         cache_misses.absent++;
> -       else if (err)
> -         cache_misses.errors++;
> -       else
> -         cache_misses.present++;
> -       if (name[0] == '.')
> -         {
> -           if (name[1] == '\0')
> -             cache_misses.dot++;
> -           else if (name[1] == '.' && name[2] == '\0')
> -             cache_misses.dotdot++;
> -         }
> -     }
> -      pthread_spin_unlock (&cm_lock);
> -
>        if (err && err != ENOENT)
>       return err;
>  
> -- 
> 2.1.0
> 

-- 
Samuel
...
<rv_> et Ctrl alt F2 pour aller sous console
<rv_> mais c koi pour passer d'un bureau a un autre !
<rv_> au fait c koi le raccourci pour passer d'un bureau a un autre 'question 
stupide"
<cycyx> ça dépend du window manager et de ta conf
<Firebird> ce qui fonctionne toujours c'est CTRL-ALT-BCKSP
-:- SignOff rv_: #linuxfr (Read error: EOF from client)
-:- rv_ [~rv@217.11.166.169] has joined #linuxfr
<rv_> Firebird: MEURT...



reply via email to

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