DragonFly- master sys/dev/netif/emx if_emx.h

Matthew Dillon dillon at apollo.backplane.com
Wed Apr 29 09:44:19 PDT 2009

:Mmm, setting __cachealign on struct field (i.e. in emx_softc) does not
:achieve what I want here: I want the struct's size to be (N *
:cacheline_size) in addition to be cacheline_size aligned.  So in
:ifpoll, CPU0's writing to rx_data[0] will not pollute rx_data[1]'s
:cache in CPU1.
:Best Regards,

    Ah, I see.  Yes, that makes sense.  In the old days we would
    accomplish that by explicitly padding the structure, or creating
    an enclosing structure with the pad to declare the array as.

    In anycase, I guess __cachealign is fine.  I just hate using that
    GCC extension, it is so non-standard.

					Matthew Dillon 
					<dillon at backplane.com>

More information about the Commits mailing list