Re: [PATCH 19/25]: Remove unused fields in packet history structure

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

 



On 3/26/07, Ian McDonald <ian.mcdonald@xxxxxxxxxxx> wrote:
On 3/22/07, Gerrit Renker <gerrit@xxxxxxxxxxxxxx> wrote:
> [CCID 3]: Remove unused fields in packet history structure
>
Acked-by: Ian McDonald <ian.mcdonald@xxxxxxxxxxx>

Indeed it reduced the size:

[acme@mica net-2.6.22]$ cat /tmp/before
/* <eb7c> /home/acme/git/net-2.6.22/net/dccp/ccids/lib/packet_history.h:55 */
struct dccp_tx_hist_entry {
       struct list_head           dccphtx_node;         /*     0    16 */
       u64                        dccphtx_seqno:48;     /*    16     8 */
       u64                        dccphtx_sent:1;       /*    16     8 */

       /* XXX 15 bits hole, try to pack */

       u32                        dccphtx_rtt;          /*    24     4 */

       /* XXX 4 bytes hole, try to pack */

       struct timeval             dccphtx_tstamp;       /*    32    16 */
}; /* size: 48, cachelines: 1 */
  /* sum members: 44, holes: 1, sum holes: 4 */
  /* bit holes: 1, sum bit holes: 15 bits */
  /* last cacheline: 48 bytes */
[acme@mica net-2.6.22]$ pahole -e
../build/mica/net-2.6.22/net/dccp/ccids/ccid3.o dccp_tx_hist_entry /*
<eb7c> /home/acme/git/net-2.6.22/net/dccp/ccids/lib/packet_history.h:55
*/
struct dccp_tx_hist_entry {
       struct list_head           dccphtx_node;         /*     0    16 */
       u64                        dccphtx_seqno;        /*    16     8 */
       struct timeval             dccphtx_tstamp;       /*    24    16 */
}; /* size: 40, cachelines: 1 */
  /* last cacheline: 40 bytes */
[acme@mica net-2.6.22]$

I wonder if we could make this a single linked list, lemme see.. I
think so, and by doing that we get the struct down to 32 bytes, making
it cacheline friendly, and also simplify the operations, i.e. that
opencoded list operation would just go away, will leave this for
later, in a TODO file.

- Arnaldo
-
To unsubscribe from this list: send the line "unsubscribe dccp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [IETF DCCP]     [Linux Networking]     [Git]     [Security]     [Linux Assembly]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux