
deri at ntop
May 9, 2011, 1:26 AM
Post #2 of 2
(218 views)
Permalink
|
|
Re: flowSlotInfo and L1 VIVT coherence issues
[In reply to]
|
|
Rui my colleague Alfredo is working at memory alignment, so I think he should speak about that. Alfredo; what's you opinion? Luca On May 9, 2011, at 10:23 AM, Rui wrote: > hi luca: > > regarding this data structure,when I compiled it at a 64bit machine, > the tot_fwd_notok offset is 64 Bytes > padding offset is 72 Bytes, I wonder if it is comply to your designed? > > I think the pack size is 8 Bytes, which lead to tot_pkts offset is > 24Bytes,not 20Bytes?? > > > typedef struct flowSlotInfo { > /* first page, managed by kernel */ > u_int16_t version, sample_rate; > u_int32_t min_num_slots, slot_len, data_len, tot_mem; > u_int64_t tot_pkts, tot_lost, tot_insert; > u_int32_t insert_off /* managed by kernel */; > u_int64_t tot_fwd_ok, tot_fwd_notok; > /* <-- 64 bytes here, should be enough to avoid some L1 VIVT > coherence issues (32 ~ 64bytes lines) */ > char padding[128]; > /* <-- 128 bytes here, should be enough to avoid false sharing in > most L2 (64 ~ 128bytes lines) */ > char k_padding[3904]; > /* <-- 4096 bytes here, to get a page aligned block writable by > kernel side only */ > > /* second page, managed by userland */ > u_int64_t tot_read; > u_int32_t remove_off /* managed by userland */; > u_int32_t vpfring_guest_flags; /* used by vPFRing */ > char u_padding[4080]; > /* <-- 8192 bytes here, to get a page aligned block writable by > userland only */ > } FlowSlotInfo; > > > regards, > rui > _______________________________________________ > Ntop-misc mailing list > Ntop-misc [at] listgateway > http://listgateway.unipi.it/mailman/listinfo/ntop-misc --- If you can not measure it, you can not improve it - Lord Kelvin _______________________________________________ Ntop-misc mailing list Ntop-misc [at] listgateway http://listgateway.unipi.it/mailman/listinfo/ntop-misc
|