svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys

Randall Stewart rrs at netflix.com
Tue Mar 31 00:26:27 UTC 2015


On Mar 30, 2015, at 9:16 AM, John Baldwin <jhb at freebsd.org> wrote:

> On Saturday, March 28, 2015 12:50:24 PM Randall Stewart wrote:
>> Author: rrs
>> Date: Sat Mar 28 12:50:24 2015
>> New Revision: 280785
>> URL: https://svnweb.freebsd.org/changeset/base/280785
>> 
>> Log:
>>  Change the callout to supply -1 to indicate we are not changing
>>  CPU, also add protection against invalid CPU's as well as
>>  split c_flags and c_iflags so that if a user plays with the active
>>  flag (the one expected to be played with by callers in MPSAFE) without
>>  a lock, it won't adversely affect the callout system by causing a corrupt
>>  list. This also means that all callers need to use the macros and *not*
>>  play with the falgs directly (like netgraph used to).
>> 
>>  Differential Revision: htts://reviews.freebsd.org/D1894
>>  Reviewed by: .. timed out but looked at by jhb, imp, adrian hselasky
>>               tested by hiren and netflix.
>>  Sponsored by:	Netflix Inc.
> 
> Please use NOCPU rather than -1 directly for the CPU field when not
> moving a callout.
> 

John:

I have made *all* of your suggested changes, adopting the comments and
moving migration to kern_timeout.c.. thanks..

Now as to the 

-1 -> NOCPU

This is like pulling on a string on your sweater.. the only sensible solution that
I could come up with after chatting with Lawrence is to add 
#include <sys/proc.h>
to everyone that uses the callout.h and does not have it already… (putting it into callout.h does not work) .. sigh..

Now for this cosmetic change I end up with the following changes (and as yet I have
not built LINT or universe so there may be more).. I have spent about 2 hours on this
so far and I can at least build a kernel with the change for amd64 :-0

Here is what has to change, do you really think that this is worth it?

Note I did not look into moving NOCPU in proc.h it says it means no CPU is present
which is sort of the meaning we want.. I am not sure if the define could be moved .. but
that too may be yet another string...

Is this worth it, or do you have another idea on how best to do this???

R

---------------------------

M       amd64/vmm/io/vatpit.c
M       amd64/vmm/io/vhpet.c
M       amd64/vmm/io/vlapic.c
M       amd64/vmm/io/vrtc.c
M       cam/ctl/ctl.c
M       cam/ctl/ctl_frontend_iscsi.c
M       cam/ctl/ctl_tpc.c
M       cam/scsi/scsi_cd.c
M       cam/scsi/scsi_enc.c
M       conf/kern.opts.mk
M       dev/aac/aac.c
M       dev/aacraid/aacraid.c
M       dev/advansys/advansys.c
M       dev/advansys/advlib.c
M       dev/advansys/adwcam.c
M       dev/ae/if_ae.c
M       dev/age/if_age.c
M       dev/aha/aha.c
M       dev/ahci/ahci.c
M       dev/aic/aic.c
M       dev/aic7xxx/ahc_isa.c
M       dev/aic7xxx/ahc_pci.c
M       dev/aic7xxx/aic7770.c
M       dev/aic7xxx/aic79xx_osm.h
M       dev/aic7xxx/aic7xxx.c
M       dev/aic7xxx/aic7xxx_93cx6.c
M       dev/aic7xxx/aic7xxx_osm.c
M       dev/aic7xxx/aic7xxx_pci.c
M       dev/aic7xxx/aic7xxx_reg_print.c
M       dev/alc/if_alc.c
M       dev/ale/if_ale.c
M       dev/ata/ata-all.c
M       dev/ata/ata-lowlevel.c
M       dev/ath/if_ath.c
M       dev/ath/if_ath_led.c
M       dev/atkbdc/psm.c
M       dev/bce/if_bce.c
M       dev/bfe/if_bfe.c
M       dev/bge/if_bge.c
M       dev/buslogic/bt.c
M       dev/bwn/if_bwn.c
M       dev/bxe/bxe.h
M       dev/cas/if_cas.c
M       dev/ciss/ciss.c
M       dev/cmx/cmx.c
M       dev/cs/if_cs.c
M       dev/cxgbe/t4_main.c
M       dev/cxgbe/t4_sge.c
M       dev/dc/if_dc.c
M       dev/de/if_de.c
M       dev/dpt/dpt_scsi.c
M       dev/e1000/if_em.c
M       dev/e1000/if_igb.c
M       dev/e1000/if_lem.c
M       dev/ed/if_ed.c
M       dev/ep/if_ep.c
M       dev/esp/ncr53c9x.c
M       dev/fatm/if_fatm.c
M       dev/fe/if_fe.c
M       dev/firewire/firewire.c
M       dev/firewire/sbp.c
M       dev/firewire/sbp_targ.c
M       dev/fxp/if_fxp.c
M       dev/gem/if_gem.c
M       dev/hme/if_hme.c
M       dev/hpt27xx/os_bsd.h
M       dev/hptiop/hptiop.c
M       dev/hptnr/os_bsd.h
M       dev/hptrr/os_bsd.h
M       dev/ida/ida.c
M       dev/iir/iir.c
M       dev/ips/ips.c
M       dev/ipw/if_ipw.c
M       dev/isci/isci.h
M       dev/iscsi/iscsi.c
M       dev/iwn/if_iwn.c
M       dev/le/lance.c
M       dev/led/led.c
M       dev/lge/if_lge.c
M       dev/lmc/if_lmc.c
M       dev/malo/if_malo.c
M       dev/mcd/mcd.c
M       dev/mlx/mlx.c
M       dev/mpr/mpr_sas.c
M       dev/mps/mps_sas.c
M       dev/mps/mps_sas_lsi.c
M       dev/msk/if_msk.c
M       dev/mvs/mvs.c
M       dev/mwl/if_mwl.c
M       dev/mxge/if_mxge.c
M       dev/my/if_my.c
M       dev/nfe/if_nfe.c
M       dev/nge/if_nge.c
M       dev/ntb/if_ntb/if_ntb.c
M       dev/ntb/ntb_hw/ntb_hw.c
M       dev/patm/if_patm_tx.c
M       dev/pcn/if_pcn.c
M       dev/ppbus/lpt.c
M       dev/ppbus/pps.c
M       dev/ral/rt2560.c
M       dev/ral/rt2661.c
M       dev/ral/rt2860.c
M       dev/re/if_re.c
M       dev/rl/if_rl.c
M       dev/scd/scd.c
M       dev/sdhci/sdhci.c
M       dev/sf/if_sf.c
M       dev/sge/if_sge.c
M       dev/siis/siis.c
M       dev/sis/if_sis.c
M       dev/sk/if_sk.c
M       dev/sn/if_sn.c
M       dev/ste/if_ste.c
M       dev/stge/if_stge.c
M       dev/ti/if_ti.c
M       dev/tl/if_tl.c
M       dev/twa/tw_osl_freebsd.c
M       dev/tx/if_tx.c
M       dev/txp/if_txp.c
M       dev/uart/uart_core.c
M       dev/usb/controller/ehci.c
M       dev/usb/controller/ohci.c
M       dev/usb/controller/uhci.c
M       dev/usb/controller/xhci_pci.c
M       dev/usb/gadget/g_audio.c
M       dev/usb/gadget/g_keyboard.c
M       dev/usb/gadget/g_modem.c
M       dev/usb/gadget/g_mouse.c
M       dev/usb/input/atp.c
M       dev/usb/input/ums.c
M       dev/usb/net/if_usie.c
M       dev/usb/net/usb_ethernet.c
M       dev/usb/serial/ulpt.c
M       dev/usb/serial/uslcom.c
M       dev/usb/wlan/if_rsu.c
M       dev/usb/wlan/if_rum.c
M       dev/usb/wlan/if_run.c
M       dev/usb/wlan/if_uath.c
M       dev/usb/wlan/if_upgt.c
M       dev/usb/wlan/if_ural.c
M       dev/usb/wlan/if_urtw.c
M       dev/usb/wlan/if_urtwn.c
M       dev/usb/wlan/if_zyd.c
M       dev/vge/if_vge.c
M       dev/virtio/network/if_vtnet.c
M       dev/virtio/random/virtio_random.c
M       dev/virtio/scsi/virtio_scsi.c
M       dev/vmware/vmxnet3/if_vmx.c
M       dev/vr/if_vr.c
M       dev/vte/if_vte.c
M       dev/vx/if_vx.c
M       dev/watchdog/watchdog.c
M       dev/wb/if_wb.c
M       dev/wpi/if_wpi.c
M       dev/xe/if_xe.c
M       dev/xen/netfront/netfront.c
M       dev/xl/if_xl.c
M       gdb/gdb_cons.c
M       geom/cache/g_cache.c
M       geom/raid/md_ddf.c
M       geom/raid/md_intel.c
M       geom/raid/md_jmicron.c
M       geom/raid/md_nvidia.c
M       geom/raid/md_promise.c
M       geom/raid/md_sii.c
M       kern/subr_vmem.c
M       kern/uipc_domain.c
M       net/ieee8023ad_lacp.c
M       net/if_spppsubr.c
M       net80211/ieee80211_ht.c
M       net80211/ieee80211_node.c
M       net80211/ieee80211_output.c
M       net80211/ieee80211_proto.c
M       netgraph/bluetooth/socket/ng_btsocket_l2cap.c
M       netgraph/bluetooth/socket/ng_btsocket_sco.c
M       netgraph/netflow/netflow.c
M       netgraph/netflow/ng_netflow.c
M       netinet/ip_mroute.c
M       netinet/sctp_os_bsd.h
M       netinet/tcp_hostcache.c
M       netinet6/in6_rmx.c
M       netinet6/ip6_mroute.c
M       netinet6/nd6.c
M       netinet6/nd6_nbr.c
M       netpfil/pf/if_pfsync.c


--------
Randall Stewart
rrs at netflix.com
803-317-4952







More information about the svn-src-head mailing list