[prev in list] [next in list] [prev in thread] [next in thread]
List: hail-devel
Subject: Re: Trivial Q about chunkd's main_loop
From: Jeff Garzik <jeff () garzik ! org>
Date: 2010-04-18 2:32:03
Message-ID: 4BCA6F23.9010108 () garzik ! org
[Download RAW message or body]
On 04/17/2010 09:36 PM, Pete Zaitcev wrote:
> Is there a reason why the main_loop in chunkd uses a naked
> g_hash_table_lookup instead of srv_poll_lookup? Performance?
>
> @@ -1681,8 +1681,7 @@ static int main_loop(void)
>
> fired++;
>
> - sp = g_hash_table_lookup(chunkd_srv.fd_info,
> - GINT_TO_POINTER(pfd->fd));
> + sp = srv_poll_lookup(pfd->fd);
> if (G_UNLIKELY(!sp)) {
Looks like it should be changed to call srv_poll_lookup(), indeed.
srv_poll_lookup() is marked 'static', so there should not be any
performance difference after the compiler's optimizer passes get
finished with it.
Jeff
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic