* [PATCH] DCCP: fix printk format warnings
@ 2006-10-29 21:24 Randy Dunlap
2006-10-30 0:04 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2006-10-29 21:24 UTC (permalink / raw)
To: netdev; +Cc: davem, acme, akpm
From: Randy Dunlap <randy.dunlap@oracle.com>
Fix printk format warnings:
build2.out:net/dccp/ccids/ccid2.c:355: warning: long long unsigned int format, u64 arg (arg 3)
build2.out:net/dccp/ccids/ccid2.c:360: warning: long long unsigned int format, u64 arg (arg 3)
build2.out:net/dccp/ccids/ccid2.c:482: warning: long long unsigned int format, u64 arg (arg 5)
build2.out:net/dccp/ccids/ccid2.c:639: warning: long long unsigned int format, u64 arg (arg 3)
build2.out:net/dccp/ccids/ccid2.c:639: warning: long long unsigned int format, u64 arg (arg 4)
build2.out:net/dccp/ccids/ccid2.c:674: warning: long long unsigned int format, u64 arg (arg 3)
build2.out:net/dccp/ccids/ccid2.c:720: warning: long long unsigned int format, u64 arg (arg 3)
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
net/dccp/ccids/ccid2.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff -Naurp linux-2.6.19-rc3-git5/net/dccp/ccids/ccid2.c~net_dccp_ccids_printk linux-2.6.19-rc3-git5/net/dccp/ccids/ccid2.c
--- linux-2.6.19-rc3-git5/net/dccp/ccids/ccid2.c~net_dccp_ccids_printk 2006-10-28 21:06:32.298965000 -0700
+++ linux-2.6.19-rc3-git5/net/dccp/ccids/ccid2.c 2006-10-29 13:23:45.211141000 -0800
@@ -352,14 +352,14 @@ static void ccid2_hc_tx_packet_sent(stru
#ifdef CONFIG_IP_DCCP_CCID2_DEBUG
ccid2_pr_debug("pipe=%d\n", hctx->ccid2hctx_pipe);
- ccid2_pr_debug("Sent: seq=%llu\n", seq);
+ ccid2_pr_debug("Sent: seq=%llu\n", (unsigned long long)seq);
do {
struct ccid2_seq *seqp = hctx->ccid2hctx_seqt;
while (seqp != hctx->ccid2hctx_seqh) {
ccid2_pr_debug("out seq=%llu acked=%d time=%lu\n",
- seqp->ccid2s_seq, seqp->ccid2s_acked,
- seqp->ccid2s_sent);
+ (unsigned long long)seqp->ccid2s_seq,
+ seqp->ccid2s_acked, seqp->ccid2s_sent);
seqp = seqp->ccid2s_next;
}
} while (0);
@@ -480,7 +480,8 @@ static inline void ccid2_new_ack(struct
/* first measurement */
if (hctx->ccid2hctx_srtt == -1) {
ccid2_pr_debug("R: %lu Time=%lu seq=%llu\n",
- r, jiffies, seqp->ccid2s_seq);
+ r, jiffies,
+ (unsigned long long)seqp->ccid2s_seq);
ccid2_change_srtt(hctx, r);
hctx->ccid2hctx_rttvar = r >> 1;
} else {
@@ -636,8 +637,9 @@ static void ccid2_hc_tx_packet_recv(stru
u64 ackno_end_rl;
dccp_set_seqno(&ackno_end_rl, ackno - rl);
- ccid2_pr_debug("ackvec start:%llu end:%llu\n", ackno,
- ackno_end_rl);
+ ccid2_pr_debug("ackvec start:%llu end:%llu\n",
+ (unsigned long long)ackno,
+ (unsigned long long)ackno_end_rl);
/* if the seqno we are analyzing is larger than the
* current ackno, then move towards the tail of our
* seqnos.
@@ -672,7 +674,7 @@ static void ccid2_hc_tx_packet_recv(stru
seqp->ccid2s_acked = 1;
ccid2_pr_debug("Got ack for %llu\n",
- seqp->ccid2s_seq);
+ (unsigned long long)seqp->ccid2s_seq);
ccid2_hc_tx_dec_pipe(sk);
}
if (seqp == hctx->ccid2hctx_seqt) {
@@ -718,7 +720,7 @@ static void ccid2_hc_tx_packet_recv(stru
while (1) {
if (!seqp->ccid2s_acked) {
ccid2_pr_debug("Packet lost: %llu\n",
- seqp->ccid2s_seq);
+ (unsigned long long)seqp->ccid2s_seq);
/* XXX need to traverse from tail -> head in
* order to detect multiple congestion events in
* one ack vector.
---
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] DCCP: fix printk format warnings
2006-10-29 21:24 [PATCH] DCCP: fix printk format warnings Randy Dunlap
@ 2006-10-30 0:04 ` David Miller
2006-10-30 21:30 ` [RFC] Any strong reason why socket dentries are hashed in global d_hash table ? Eric Dumazet
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2006-10-30 0:04 UTC (permalink / raw)
To: randy.dunlap; +Cc: netdev, acme, akpm
From: Randy Dunlap <randy.dunlap@oracle.com>
Date: Sun, 29 Oct 2006 13:24:40 -0800
> Fix printk format warnings:
> build2.out:net/dccp/ccids/ccid2.c:355: warning: long long unsigned int format, u64 arg (arg 3)
> build2.out:net/dccp/ccids/ccid2.c:360: warning: long long unsigned int format, u64 arg (arg 3)
> build2.out:net/dccp/ccids/ccid2.c:482: warning: long long unsigned int format, u64 arg (arg 5)
> build2.out:net/dccp/ccids/ccid2.c:639: warning: long long unsigned int format, u64 arg (arg 3)
> build2.out:net/dccp/ccids/ccid2.c:639: warning: long long unsigned int format, u64 arg (arg 4)
> build2.out:net/dccp/ccids/ccid2.c:674: warning: long long unsigned int format, u64 arg (arg 3)
> build2.out:net/dccp/ccids/ccid2.c:720: warning: long long unsigned int format, u64 arg (arg 3)
>
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Applied, thanks a lot Randy.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [RFC] Any strong reason why socket dentries are hashed in global d_hash table ?
2006-10-30 0:04 ` David Miller
@ 2006-10-30 21:30 ` Eric Dumazet
2006-10-30 22:15 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2006-10-30 21:30 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In sock_attach_fd(), we are currently using
d_add(file->f_dentry, SOCK_INODE(sock));
This has the effect to insert the dentry into the dentry_hashtable.
I was wondering if it is really necessary : On a machine with many sockets,
the dentry_hashtable lookups may be slowed down for no good reason. (sockets
are not accessable by other means than socket() syscall, and not subject to
'unuse and LRU freeable syndrom').
If we replace d_add(file->f_dentry, SOCK_INODE(sock)) call by
d_instantiate(file->f_dentry, SOCK_INODE(sock)), we also avoid using rcu
callback when socket is closed. (We would have to not provide a d_op->d_delete
() method in sockfs_dentry_operations)
Maybe I just provide a patch instead of just talking ? :)
Eric
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC] Any strong reason why socket dentries are hashed in global d_hash table ?
2006-10-30 21:30 ` [RFC] Any strong reason why socket dentries are hashed in global d_hash table ? Eric Dumazet
@ 2006-10-30 22:15 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2006-10-30 22:15 UTC (permalink / raw)
To: dada1; +Cc: netdev
From: Eric Dumazet <dada1@cosmosbay.com>
Date: Mon, 30 Oct 2006 22:30:39 +0100
> In sock_attach_fd(), we are currently using
>
> d_add(file->f_dentry, SOCK_INODE(sock));
>
> This has the effect to insert the dentry into the dentry_hashtable.
>
> I was wondering if it is really necessary : On a machine with many sockets,
> the dentry_hashtable lookups may be slowed down for no good reason. (sockets
> are not accessable by other means than socket() syscall, and not subject to
> 'unuse and LRU freeable syndrom').
>
> If we replace d_add(file->f_dentry, SOCK_INODE(sock)) call by
> d_instantiate(file->f_dentry, SOCK_INODE(sock)), we also avoid using rcu
> callback when socket is closed. (We would have to not provide a d_op->d_delete
> () method in sockfs_dentry_operations)
Sounds like a useful optimization for sure.
You can't mount sockfs on the filesystem, but they are visible
via /proc/${pid}/fd/, I wonder if the dentry hashing is required
just to make those nodes visible properly?
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-10-30 22:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-29 21:24 [PATCH] DCCP: fix printk format warnings Randy Dunlap
2006-10-30 0:04 ` David Miller
2006-10-30 21:30 ` [RFC] Any strong reason why socket dentries are hashed in global d_hash table ? Eric Dumazet
2006-10-30 22:15 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox