Justus Winter, le Tue 13 May 2014 21:02:54 +0200, a écrit :
> * include/refcount.h: New file.
Ack.
> ---
> include/refcount.h | 193
> +
> 1 file changed, 193 insertions(+)
> create mode 100644 include/refcount.h
>
> diff --git a/include/ref
Justus Winter, le Tue 13 May 2014 21:02:53 +0200, a écrit :
> Expressing the maximum load in binary percent (where 128b% corresponds
> to 100%) allows us to use fast binary scaling to determine if the
> maximum load has been reached without losing precision.
>
> Furthermore, the previously used ex
Justus Winter, le Tue 13 May 2014 21:02:52 +0200, a écrit :
> libihash uses open addressing. Previously, quadratic probing in both
> directions was used to resolve collisions. Quadratic probing might
> result in a less efficient use of caches.
>
> Also, prime numbers of the form 4 * i + 3 were u
Justus Winter, le Tue 13 May 2014 21:02:51 +0200, a écrit :
> Use an integer hash function to derive the index from the key. This
> should reduce the number of collisions.
Ack.
> * libihash/ihash.c (hash_int32): New function.
> (find_index): Use hash_int32 on the key to derive the index.
> (add_
Justus Winter, le Tue 13 May 2014 21:02:50 +0200, a écrit :
> Previously, int was used for the field max_load of struct hurd_ihash.
> There is no reason for this as far as I can tell. Furthermore,
> hurd_ihash_set_max_load takes an unsigned int max_load.
Ack.
> * libihash/ihash.h (struct hurd_ih
* include/refcount.h: New file.
---
include/refcount.h | 193 +
1 file changed, 193 insertions(+)
create mode 100644 include/refcount.h
diff --git a/include/refcount.h b/include/refcount.h
new file mode 100644
index 000..0816220
--- /dev/nu
Expressing the maximum load in binary percent (where 128b% corresponds
to 100%) allows us to use fast binary scaling to determine if the
maximum load has been reached without losing precision.
Furthermore, the previously used expression 'ht->nr_items * 100'
overflows int at 2^25 (unsigned int at 2
* libdiskfs/diskfs.h (struct peropen): Use refcount_t for field refcnt.
* libdiskfs/peropen-make.c (diskfs_make_peropen): Initialize refcnt.
* libdiskfs/peropen-rele.c (diskfs_release_peropen): Adjust accordingly.
* libdiskfs/protid-make.c (diskfs_start_protid): Likewise. Also, the
node must no lo
* libtrivfs/trivfs.h (struct trivfs_peropen): Use refcount_t for field
refcnt.
(struct trivfs_control): Remove unused field lock.
* libtrivfs/cntl-create.c (trivfs_create_control): Drop the mutex
initialization.
* libtrivfs/io-reauthenticate.c (trivfs_S_io_reauthenticate): Adjust
accordingly.
* lib
Previously, int was used for the field max_load of struct hurd_ihash.
There is no reason for this as far as I can tell. Furthermore,
hurd_ihash_set_max_load takes an unsigned int max_load.
* libihash/ihash.h (struct hurd_ihash): Use unsigned int for field
max_load.
---
libihash/ihash.h | 2 +-
1
Use an integer hash function to derive the index from the key. This
should reduce the number of collisions.
* libihash/ihash.c (hash_int32): New function.
(find_index): Use hash_int32 on the key to derive the index.
(add_one): Likewise.
---
libihash/ihash.c | 17 +++--
1 file changed
libihash uses open addressing. Previously, quadratic probing in both
directions was used to resolve collisions. Quadratic probing might
result in a less efficient use of caches.
Also, prime numbers of the form 4 * i + 3 were used as array sizes.
This was used in combination with the integer modu
Quoting Samuel Thibault (2014-05-13 12:55:29)
> Justus Winter, le Tue 13 May 2014 12:52:03 +0200, a écrit :
> > Quoting Neal H. Walfield (2014-05-13 09:44:21)
> > > At Mon, 12 May 2014 12:05:41 +0200,
> > > Justus Winter wrote:
> > > > +/* Decrement REF. Return the result of the operation. This f
Richard Braun, le Tue 13 May 2014 14:01:59 +0200, a écrit :
> On Tue, May 13, 2014 at 12:56:03PM +0200, Samuel Thibault wrote:
> > > > AIUI this cast is a case of type-puning. Why not making refcounts_t the
> > > > union itself? That way would be clearly safe with gcc's extension.
> > >
> > > As
On Tue, May 13, 2014 at 12:56:03PM +0200, Samuel Thibault wrote:
> > > AIUI this cast is a case of type-puning. Why not making refcounts_t the
> > > union itself? That way would be clearly safe with gcc's extension.
> >
> > As stated in the comment for refcounts_t, I like the idea of using the
>
At Tue, 13 May 2014 13:47:51 +0200,
Samuel Thibault wrote:
>
> Neal H. Walfield, le Tue 13 May 2014 13:44:37 +0200, a écrit :
> > At Tue, 13 May 2014 12:52:03 +0200,
> > Justus Winter wrote:
> > > Quoting Neal H. Walfield (2014-05-13 09:44:21)
> > > > At Mon, 12 May 2014 12:05:41 +0200,
> > > > Ju
Neal H. Walfield, le Tue 13 May 2014 13:44:37 +0200, a écrit :
> At Tue, 13 May 2014 12:52:03 +0200,
> Justus Winter wrote:
> > Quoting Neal H. Walfield (2014-05-13 09:44:21)
> > > At Mon, 12 May 2014 12:05:41 +0200,
> > > Justus Winter wrote:
> > > > +/* Decrement REF. Return the result of the op
At Tue, 13 May 2014 12:52:03 +0200,
Justus Winter wrote:
>
> Quoting Neal H. Walfield (2014-05-13 09:44:21)
> > At Mon, 12 May 2014 12:05:41 +0200,
> > Justus Winter wrote:
> > > +/* Decrement REF. Return the result of the operation. This function
> > > + uses atomic operations. It is not req
Justus Winter, le Tue 13 May 2014 12:54:33 +0200, a écrit :
> I'm aware of that. Note that _ports_complete_deallocate aquires the
> _ports_htable_lock and checks if someone reacquired a reference
> through the hash table.
It should be explained how the whole figure works as a comment somewhere
in
Justus Winter, le Tue 13 May 2014 12:50:54 +0200, a écrit :
> Quoting Samuel Thibault (2014-05-13 01:04:13)
> > Justus Winter, le Mon 12 May 2014 12:05:41 +0200, a écrit :
> > > +/* An opaque type. You must not access these values directly. */
> > > +typedef uint64_t refcounts_t;
> > > +
> > > +/
Justus Winter, le Tue 13 May 2014 12:52:03 +0200, a écrit :
> Quoting Neal H. Walfield (2014-05-13 09:44:21)
> > At Mon, 12 May 2014 12:05:41 +0200,
> > Justus Winter wrote:
> > > +/* Decrement REF. Return the result of the operation. This function
> > > + uses atomic operations. It is not req
Quoting Samuel Thibault (2014-05-13 00:28:38)
> Justus Winter, le Mon 12 May 2014 12:05:42 +0200, a écrit :
> > - pthread_mutex_lock (&_ports_lock);
> >pthread_mutex_lock (&_ports_htable_lock);
> >
> >if (_ports_htable.nr_items == 0)
> > @@ -60,13 +59,12 @@ _ports_bucket_class_iterate (s
Justus Winter, le Tue 13 May 2014 12:48:46 +0200, a écrit :
> Quoting Samuel Thibault (2014-05-13 01:00:30)
> > Justus Winter, le Mon 12 May 2014 12:05:40 +0200, a écrit :
> > > Previously, libports used a hash table per port bucket. This makes
> > > looking up a port difficult if one does not kno
Quoting Neal H. Walfield (2014-05-13 09:44:21)
> At Mon, 12 May 2014 12:05:41 +0200,
> Justus Winter wrote:
> > +/* Decrement REF. Return the result of the operation. This function
> > + uses atomic operations. It is not required to serialize calls to
> > + this function. */
> > +static inl
Quoting Samuel Thibault (2014-05-13 01:04:13)
> Justus Winter, le Mon 12 May 2014 12:05:41 +0200, a écrit :
> > +/* An opaque type. You must not access these values directly. */
> > +typedef uint64_t refcounts_t;
> > +
> > +/* Instead, the functions manipulating refcounts_t values write the
> > +
Quoting Samuel Thibault (2014-05-13 01:00:30)
> Justus Winter, le Mon 12 May 2014 12:05:40 +0200, a écrit :
> > Previously, libports used a hash table per port bucket. This makes
> > looking up a port difficult if one does not know the port bucket, as
> > one has to iterate over all buckets and do
On Tue, May 13, 2014 at 09:47:31AM +0200, Neal H. Walfield wrote:
> This URL is not valid ("ttwang.cnc.net Not Available. The domain
> ttwang.cnc.net which you are trying to access is currently
> unavailable..."). Do you have a more stable URL? At least mention
> the name of the paper.
It disapp
At Mon, 12 May 2014 12:05:45 +0200,
Justus Winter wrote:
>
> Use an integer hash function to derive the index from the key. This
> should reduce the number of collisions.
>
> * libihash/ihash.c (hash_int32): New function.
> (find_index): Use hash_int32 on the key to derive the index.
> (add_one)
At Mon, 12 May 2014 12:05:41 +0200,
Justus Winter wrote:
> +/* Decrement REF. Return the result of the operation. This function
> + uses atomic operations. It is not required to serialize calls to
> + this function. */
> +static inline unsigned int
> +refcount_deref (refcount_t *ref)
> +{
>
29 matches
Mail list logo