Netdev List
 help / color / mirror / Atom feed
* [REVIEW][PATCH 02/15] userns: Make credential debugging user namespace safe.
From: Eric W. Biederman @ 2012-08-25 23:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: netdev, linux-fsdevel, Serge E. Hallyn, David Miller,
	David Howells
In-Reply-To: <87lih2h6i4.fsf@xmission.com>


Cc: David Howells <dhowells@redhat.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 init/Kconfig  |    1 -
 kernel/cred.c |   10 ++++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/init/Kconfig b/init/Kconfig
index 448b701..fdabc51 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -936,7 +936,6 @@ config UIDGID_CONVERTED
 	depends on FS_POSIX_ACL = n
 	depends on QUOTA = n
 	depends on QUOTACTL = n
-	depends on DEBUG_CREDENTIALS = n
 	depends on BSD_PROCESS_ACCT = n
 	depends on DRM = n
 	depends on PROC_EVENTS = n
diff --git a/kernel/cred.c b/kernel/cred.c
index de728ac..48cea3d 100644
--- a/kernel/cred.c
+++ b/kernel/cred.c
@@ -799,9 +799,15 @@ static void dump_invalid_creds(const struct cred *cred, const char *label,
 	       atomic_read(&cred->usage),
 	       read_cred_subscribers(cred));
 	printk(KERN_ERR "CRED: ->*uid = { %d,%d,%d,%d }\n",
-	       cred->uid, cred->euid, cred->suid, cred->fsuid);
+		from_kuid_munged(&init_user_ns, cred->uid),
+		from_kuid_munged(&init_user_ns, cred->euid),
+		from_kuid_munged(&init_user_ns, cred->suid),
+		from_kuid_munged(&init_user_ns, cred->fsuid));
 	printk(KERN_ERR "CRED: ->*gid = { %d,%d,%d,%d }\n",
-	       cred->gid, cred->egid, cred->sgid, cred->fsgid);
+		from_kgid_munged(&init_user_ns, cred->gid),
+		from_kgid_munged(&init_user_ns, cred->egid),
+		from_kgid_munged(&init_user_ns, cred->sgid),
+		from_kgid_munged(&init_user_ns, cred->fsgid));
 #ifdef CONFIG_SECURITY
 	printk(KERN_ERR "CRED: ->security is %p\n", cred->security);
 	if ((unsigned long) cred->security >= PAGE_SIZE &&
-- 
1.7.5.4

^ permalink raw reply related

* [REVIEW][PATCH 01/15] userns: Enable building of pf_key sockets when user namespace support is enabled.
From: Eric W. Biederman @ 2012-08-25 23:58 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev, linux-fsdevel, Serge E. Hallyn, David Miller
In-Reply-To: <87lih2h6i4.fsf@xmission.com>


Enable building of pf_key sockets and user namespace support at the
same time.  This combination builds successfully so there is no reason
to forbid it.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
---
 init/Kconfig |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/init/Kconfig b/init/Kconfig
index b445d6f..448b701 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -944,7 +944,6 @@ config UIDGID_CONVERTED
 	# Networking
 	depends on NET_9P = n
 	depends on AF_RXRPC = n
-	depends on NET_KEY = n
 	depends on DNS_RESOLVER = n
 
 	# Filesystems
-- 
1.7.5.4

^ permalink raw reply related

* [REVIEW][PATCH 0/15] userns subsystem conversions
From: Eric W. Biederman @ 2012-08-25 23:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev, linux-fsdevel, Serge E. Hallyn, David Miller


This patchset updates all of the major linux subsystems that use uids
and gids to store them in kuid_t and kgid_t types.

This update allows some of the subsystems to work in all user namespaces
while other subsystems were updated to only work in the initial user
namespace.

kuid_t and kgid_t values have been pushed as deeply into the code as
possible to allow type checking to find as many problems as possible.
In a couple of cases this involved taking an implicit union stored in
an unsigned int and making it an explicit union.

This patchset is based on 3.6-rc1 and strictly against:
git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git for-next

My intention after these patches have been reviewed is to add them to my
non-rebasing for-next branch of my user namespace tree and to merge
these changes into 3.7.

I had hoped when I converted the core kernel that I would have removed
the interactions between subsystems and would be able to merge these
changes independently through maintainer trees in a timely fashion, but
there are just enough dependencies and interactions that the changes
really all need to be in one tree to make these changes testable/usable.

Once these changes hit my for-next branch I won't be rebasing them so
if a maintainer wants to merge them to avoid conflicts feel free.

The biggest cross subystem change this round is probably the change
to have audit_get_loginuid return a kuid_t, but it certainly isn't
the only cross subsystem change.

Eric W. Biederman (15):
      userns: Enable building of pf_key sockets when user namespace support is enabled.
      userns: Make credential debugging user namespace safe.
      userns: Convert security/keys to the new userns infrastructure
      userns: net: Call key_alloc with GLOBAL_ROOT_UID, GLOBAL_ROOT_GID instead of 0, 0
      userns: Convert ipc to use kuid and kgid where appropriate
      userns: Convert audit to use kuid and kgid where appropriate
      userns: Convert taskstats to handle the user and pid namespaces.
      userns: Convert bsd process accounting to use kuid and kgid where appropriate
      userns: Convert process event connector to handle kuids and kgids
      userns: Convert debugfs to use kuid/kgid where appropriate.
      userns: Teach trace to use from_kuid
      userns: Convert drm to use kuid and kgid and struct pid where appropriate
      userns: Add basic quota support
      userns: Convert vfs posix_acl support to use kuid and kgid where appripriate.
      userns: Convert configfs to use kuid and kgid where appropriate

 drivers/connector/cn_proc.c       |   18 +++-
 drivers/gpu/drm/drm_fops.c        |    3 +-
 drivers/gpu/drm/drm_info.c        |    5 +-
 drivers/gpu/drm/drm_ioctl.c       |    4 +-
 drivers/tty/tty_audit.c           |   16 ++--
 fs/9p/acl.c                       |    8 +-
 fs/btrfs/acl.c                    |    8 +-
 fs/configfs/inode.c               |    4 +-
 fs/debugfs/inode.c                |   26 +++--
 fs/ext2/acl.c                     |   32 ++++--
 fs/ext3/acl.c                     |   32 ++++--
 fs/ext4/acl.c                     |   31 ++++--
 fs/generic_acl.c                  |    4 +-
 fs/gfs2/acl.c                     |   14 ++--
 fs/gfs2/quota.c                   |   44 +++++---
 fs/jffs2/acl.c                    |    4 +-
 fs/jfs/acl.c                      |    4 +-
 fs/jfs/xattr.c                    |    4 +-
 fs/nfs/nfs3acl.c                  |    4 +-
 fs/nfsd/vfs.c                     |    8 +-
 fs/ocfs2/acl.c                    |    4 +-
 fs/ocfs2/file.c                   |    6 +-
 fs/ocfs2/quota_global.c           |   34 +++++--
 fs/ocfs2/quota_local.c            |   12 ++-
 fs/posix_acl.c                    |   30 +++---
 fs/proc/base.c                    |   12 ++-
 fs/quota/dquot.c                  |   43 ++++----
 fs/quota/netlink.c                |   11 ++-
 fs/quota/quota.c                  |   44 +++++---
 fs/quota/quota_tree.c             |   20 +++-
 fs/quota/quota_v1.c               |    8 +-
 fs/quota/quota_v2.c               |   14 ++-
 drivers/connector/cn_proc.c       |   18 +++-
 drivers/gpu/drm/drm_fops.c        |    3 +-
 drivers/gpu/drm/drm_info.c        |    5 +-
 drivers/gpu/drm/drm_ioctl.c       |    4 +-
 drivers/tty/tty_audit.c           |   16 ++--
 fs/9p/acl.c                       |    8 +-
 fs/btrfs/acl.c                    |    8 +-
 fs/configfs/inode.c               |    4 +-
 fs/debugfs/inode.c                |   26 +++--
 fs/ext2/acl.c                     |   32 ++++--
 fs/ext3/acl.c                     |   32 ++++--
 fs/ext4/acl.c                     |   31 ++++--
 fs/generic_acl.c                  |    4 +-
 fs/gfs2/acl.c                     |   14 ++--
 fs/gfs2/quota.c                   |   44 +++++---
 fs/jffs2/acl.c                    |    4 +-
 fs/jfs/acl.c                      |    4 +-
 fs/jfs/xattr.c                    |    4 +-
 fs/nfs/nfs3acl.c                  |    4 +-
 fs/nfsd/vfs.c                     |    8 +-
 fs/ocfs2/acl.c                    |    4 +-
 fs/ocfs2/file.c                   |    6 +-
 fs/ocfs2/quota_global.c           |   34 +++++--
 fs/ocfs2/quota_local.c            |   12 ++-
 fs/posix_acl.c                    |   30 +++---
 fs/proc/base.c                    |   12 ++-
 fs/quota/dquot.c                  |   43 ++++----
 fs/quota/netlink.c                |   11 ++-
 fs/quota/quota.c                  |   44 +++++---
 fs/quota/quota_tree.c             |   20 +++-
 fs/quota/quota_v1.c               |    8 +-
 fs/quota/quota_v2.c               |   14 ++-
 fs/reiserfs/xattr_acl.c           |    4 +-
 fs/xattr.c                        |    7 ++
 fs/xattr_acl.c                    |   96 +++++++++++++++--
 fs/xfs/xfs_acl.c                  |    4 +-
 fs/xfs/xfs_quotaops.c             |   18 ++--
 fs/xfs/xfs_trans_dquot.c          |    8 +-
 include/drm/drmP.h                |    4 +-
 include/linux/audit.h             |   12 ++-
 include/linux/init_task.h         |    2 +-
 include/linux/ipc.h               |    9 +-
 include/linux/key.h               |    9 +-
 include/linux/posix_acl.h         |    8 ++-
 include/linux/posix_acl_xattr.h   |   18 +++-
 include/linux/quota.h             |   91 +++++++++++++++-
 include/linux/quotaops.h          |   18 +++-
 include/linux/sched.h             |    2 +-
 include/linux/tsacct_kern.h       |    8 +-
 include/linux/tty.h               |    4 +-
 include/net/netlabel.h            |    2 +-
 include/net/xfrm.h                |   23 ++--
 init/Kconfig                      |   18 ---
 ipc/msg.c                         |   14 ++-
 ipc/sem.c                         |   13 ++-
 ipc/shm.c                         |   19 ++--
 ipc/util.c                        |   35 ++++---
 ipc/util.h                        |    2 +-
 kernel/acct.c                     |    4 +-
 kernel/audit.c                    |   42 +++++---
 kernel/audit.h                    |    4 +-
 kernel/audit_watch.c              |    2 +-
 kernel/auditfilter.c              |  142 +++++++++++++++++++++----
 kernel/auditsc.c                  |  214 +++++++++++++++++++------------------
 kernel/cred.c                     |   10 ++-
 kernel/taskstats.c                |   23 +++-
 kernel/trace/trace.c              |    3 +-
 kernel/trace/trace.h              |    2 +-
 kernel/tsacct.c                   |   12 ++-
 net/core/dev.c                    |    2 +-
 net/dns_resolver/dns_key.c        |    3 +-
 net/netlabel/netlabel_unlabeled.c |    2 +-
 net/netlabel/netlabel_user.c      |    2 +-
 net/rxrpc/ar-key.c                |    6 +-
 net/xfrm/xfrm_policy.c            |    8 +-
 net/xfrm/xfrm_state.c             |    6 +-
 net/xfrm/xfrm_user.c              |   12 +-
 security/keys/internal.h          |    6 +-
 security/keys/key.c               |   23 ++---
 security/keys/keyctl.c            |   50 +++++----
 security/keys/keyring.c           |    4 +-
 security/keys/permission.c        |   14 +--
 security/keys/proc.c              |   44 ++++----
 security/keys/process_keys.c      |   15 ++--
 security/keys/request_key.c       |    6 +-
 85 files changed, 1056 insertions(+), 564 deletions(-)

^ permalink raw reply

* Re: [PATCH 0/8] csiostor: Chelsio FCoE offload driver submission
From: Naresh Kumar Inna @ 2012-08-25 19:08 UTC (permalink / raw)
  To: David Miller
  Cc: JBottomley@parallels.com, linux-scsi@vger.kernel.org,
	Dimitrios Michailidis, netdev@vger.kernel.org, Chethan Seshadri
In-Reply-To: <20120824.151008.248026066556198861.davem@davemloft.net>

On 8/25/2012 12:40 AM, David Miller wrote:
> From: Naresh Kumar Inna <naresh@chelsio.com>
> Date: Sat, 25 Aug 2012 00:34:35 +0530
> 
>> Thanks for reviewing. Is your comment with respect to any particular
>> module parameter[s] in this driver or all of them?
> 
> All of them.
> 

So are module parameters being obsoleted? You mentioned about using
generic kernel facilities for tuning driver knobs. Could you please
elaborate a bit more?

Thanks,
Naresh.

^ permalink raw reply

* Re: [PATCH 6/8] csiostor: Chelsio FCoE offload driver submission (headers part 1).
From: Naresh Kumar Inna @ 2012-08-25 19:01 UTC (permalink / raw)
  To: Nicholas A. Bellinger
  Cc: JBottomley@parallels.com, linux-scsi@vger.kernel.org,
	Dimitrios Michailidis, netdev@vger.kernel.org, Chethan Seshadri
In-Reply-To: <1345920029.28432.102.camel@haakon2.linux-iscsi.org>

On 8/26/2012 12:10 AM, Nicholas A. Bellinger wrote:
> On Sat, 2012-08-25 at 23:39 +0530, Naresh Kumar Inna wrote:
>> On 8/25/2012 2:47 AM, Nicholas A. Bellinger wrote:
>>> On Sat, 2012-08-25 at 00:06 +0530, Naresh Kumar Inna wrote:
>>>> On 8/24/2012 1:28 AM, Nicholas A. Bellinger wrote:
>>>>> On Fri, 2012-08-24 at 03:57 +0530, Naresh Kumar Inna wrote:
>>>>>> This patch contains the first set of the header files for csiostor driver.
>>>>>>
>>>>>> Signed-off-by: Naresh Kumar Inna <naresh@chelsio.com>
>>>>>> ---
>>>>>>  drivers/scsi/csiostor/csio_defs.h       |  143 ++++++
>>>>>>  drivers/scsi/csiostor/csio_fcoe_proto.h |  843 +++++++++++++++++++++++++++++++
>>>>>>  drivers/scsi/csiostor/csio_hw.h         |  668 ++++++++++++++++++++++++
>>>>>>  drivers/scsi/csiostor/csio_init.h       |  158 ++++++
>>>>>>  4 files changed, 1812 insertions(+), 0 deletions(-)
>>>>>>  create mode 100644 drivers/scsi/csiostor/csio_defs.h
>>>>>>  create mode 100644 drivers/scsi/csiostor/csio_fcoe_proto.h
>>>>>>  create mode 100644 drivers/scsi/csiostor/csio_hw.h
>>>>>>  create mode 100644 drivers/scsi/csiostor/csio_init.h
>>>>>>
>>>>>
>>>>> Hi Naresh,
>>>>>
>>>>> Just commenting on csio_defs.h bits here...  As Robert mentioned, you'll
>>>>> need to convert the driver to use (or add to) upstream protocol
>>>>> definitions and drop the csio_fcoe_proto.h bits..
>>>>>
>>>>
>>>> Hi Nicholas,
>>>>
>>>> I would like take up the discussion of the protocol header file in that
>>>> email thread. Please find the rest of my replies inline.
>>>>
>>>> Thanks for reviewing,
>>>> Naresh.
>>>>
>>>>>> diff --git a/drivers/scsi/csiostor/csio_defs.h b/drivers/scsi/csiostor/csio_defs.h
>>>>>> new file mode 100644
>>>>>> index 0000000..4f1c713
>>>>>> --- /dev/null
>>>>>> +++ b/drivers/scsi/csiostor/csio_defs.h
> 
> <SNIP>
> 
>>>>>> +static inline int
>>>>>> +csio_list_deleted(struct list_head *list)
>>>>>> +{
>>>>>> +	return ((list->next == list) && (list->prev == list));
>>>>>> +}
>>>>>> +
>>>>>> +#define csio_list_next(elem)	(((struct list_head *)(elem))->next)
>>>>>> +#define csio_list_prev(elem)	(((struct list_head *)(elem))->prev)
>>>>>> +
>>>>>> +#define csio_deq_from_head(head, elem)					  \
>>>>>> +do {									  \
>>>>>> +	if (!list_empty(head)) {					  \
>>>>>> +		*((struct list_head **)(elem)) = csio_list_next((head));  \
>>>>>> +		csio_list_next((head)) =				  \
>>>>>> +				csio_list_next(csio_list_next((head)));   \
>>>>>> +		csio_list_prev(csio_list_next((head))) = (head);	  \
>>>>>> +		INIT_LIST_HEAD(*((struct list_head **)(elem)));	          \
>>>>>> +	} else								  \
>>>>>> +		*((struct list_head **)(elem)) = (struct list_head *)NULL;\
>>>>>> +} while (0)
>>>>>> +
>>>>>
>>>>> This code is confusing as hell..  Why can't you just use normal list.h
>>>>> macros for this..?  
>>>>
>>>> I have not found an equivalent function in list.h that does the above
>>>> and the following macro. Could you please point me to it? I have seen a
>>>> couple of other drivers define their own macros to achieve what this
>>>> macro does, hence I assumed there isnt a list.h macro that does this.
>>>>
>>>
>>> AFAICT all that csio_deq_from_head code is supposed to do is pull an
>>> item off a list, right..?  Why not just:
>>>
>>>      while (!list_empty(list)) {
>>>             elem = list_first_entry(list, struct elem_type, 
>>>                                     elm_list);
>>>             list_del_init(&elem->elm_list);
>>>
>>>             <do work>
>>>             <free *elem memory>
>>>      }
>>>
>>
>> I will try to come up with a simpler static inline version of the macro.
>> Would that work?
> 
> No.  The point is that the above code is a disaster, and AFAICT there is
> no reason why any of it is necessary to begin with at all.
> 
> Why can't csio_deq_from_head() just become list_first_entry() +
> list_del_init() to do the exact same thing without all of the extra
> overhead of list_head pointer de-reference + assignments..?
> 
> --nab
> 

Yes, that's what I was trying to say.  csio_deq_from_head() will become
a static function comprising list_first_entry + list_del_init(), with
some checks perhaps.

Thanks,
Naresh.

^ permalink raw reply

* Re: [PATCH 5/8] csiostor: Chelsio FCoE offload driver submission (sources part 5).
From: Nicholas A. Bellinger @ 2012-08-25 18:43 UTC (permalink / raw)
  To: Naresh Kumar Inna
  Cc: JBottomley@parallels.com, linux-scsi@vger.kernel.org,
	Dimitrios Michailidis, netdev@vger.kernel.org, Chethan Seshadri
In-Reply-To: <50391B17.2040505@chelsio.com>

On Sun, 2012-08-26 at 00:06 +0530, Naresh Kumar Inna wrote:
> On 8/25/2012 2:26 AM, Nicholas A. Bellinger wrote:
> > On Fri, 2012-08-24 at 23:10 +0530, Naresh Kumar Inna wrote:
> >> On 8/24/2012 1:18 AM, Nicholas A. Bellinger wrote:
> >>> On Fri, 2012-08-24 at 03:57 +0530, Naresh Kumar Inna wrote:
> >>>> This patch contains code to implement the interrupt handling and the fast
> >>>> path I/O functionality. The interrupt handling includes allocation of
> >>>> MSIX vectors, registering and implemeting the interrupt service routines.
> >>>> The fast path I/O functionality includes posting the I/O request to firmware
> >>>> via Work Requests, tracking/completing them, and handling task management
> >>>> requests. SCSI midlayer host template implementation is also covered by
> >>>> this patch.
> >>>>
> >>>> Signed-off-by: Naresh Kumar Inna <naresh@chelsio.com>
> >>>> ---
> >>>
> >>> Hi Naresh,
> >>>
> >>> My review comments are inline below..
> >>
> >> Hi Nicholas,
> >>
> >> Thanks for taking the time to review the driver. Please find my replies
> >> inline.
> >>
> >> Regards,
> >> Naresh.
> >>
> >>>
> >>>>  drivers/scsi/csiostor/csio_isr.c  |  631 ++++++++++
> >>>>  drivers/scsi/csiostor/csio_scsi.c | 2498 +++++++++++++++++++++++++++++++++++++
> >>>>  2 files changed, 3129 insertions(+), 0 deletions(-)
> >>>>  create mode 100644 drivers/scsi/csiostor/csio_isr.c
> >>>>  create mode 100644 drivers/scsi/csiostor/csio_scsi.c
> >>>>

<SNIP>

> >>>
> >>>> +/*
> >>>> + * csio_scsi_init_data_wr - Initialize the READ/WRITE SCSI WR.
> >>>> + * @req: IO req structure.
> >>>> + * @oper: read/write
> >>>> + * @wrp: DMA location to place the payload.
> >>>> + * @size: Size of WR (including FW WR + immed data + rsp SG entry + data SGL
> >>>> + * @wrop:  _READ_/_WRITE_
> >>>> + *
> >>>> + * Wrapper for populating fw_scsi_read_wr/fw_scsi_write_wr.
> >>>> + */
> >>>> +#define csio_scsi_init_data_wr(req, oper, wrp, size, wrop)		       \
> >>>> +do {									       \
> >>>> +	struct csio_hw *_hw = (req)->lnode->hwp;			       \
> >>>> +	struct csio_rnode *_rn = (req)->rnode;				       \
> >>>> +	struct fw_scsi_##oper##_wr *__wr = (struct fw_scsi_##oper##_wr *)(wrp);\
> >>>> +	struct ulptx_sgl *_sgl;						       \
> >>>> +	struct csio_dma_buf *_dma_buf;					       \
> >>>> +	uint8_t _imm = csio_hw_to_scsim(_hw)->proto_cmd_len;		       \
> >>>> +	struct scsi_cmnd *scmnd = csio_scsi_cmnd((req));		       \
> >>>> +									       \
> >>>> +	__wr->op_immdlen = cpu_to_be32(FW_WR_OP(FW_SCSI##wrop##WR) |           \
> >>>> +					   FW_SCSI##wrop##WR_IMMDLEN(_imm));   \
> >>>> +	__wr->flowid_len16 = cpu_to_be32(FW_WR_FLOWID(_rn->flowid) |           \
> >>>> +					     FW_WR_LEN16(		       \
> >>>> +						CSIO_ROUNDUP((size), 16)));    \
> >>>> +	__wr->cookie = (uintptr_t) (req);				       \
> >>>> +	__wr->iqid = (uint16_t)cpu_to_be16(csio_q_physiqid(_hw,	               \
> >>>> +							       (req)->iq_idx));\
> >>>> +	__wr->tmo_val = (uint8_t)((req)->tmo);				       \
> >>>> +	__wr->use_xfer_cnt = 1;						       \
> >>>> +	__wr->xfer_cnt = cpu_to_be32(scsi_bufflen(scmnd));		       \
> >>>> +	__wr->ini_xfer_cnt = cpu_to_be32(scsi_bufflen(scmnd));		       \
> >>>> +	/* Get RSP DMA buffer */					       \
> >>>> +	_dma_buf = &(req)->dma_buf;					       \
> >>>> +									       \
> >>>> +	/* Prepare RSP SGL */						       \
> >>>> +	__wr->rsp_dmalen = cpu_to_be32(_dma_buf->len);		               \
> >>>> +	__wr->rsp_dmaaddr = cpu_to_be64(_dma_buf->paddr);		       \
> >>>> +									       \
> >>>> +	__wr->r4 = 0;							       \
> >>>> +									       \
> >>>> +	__wr->u.fcoe.ctl_pri = 0;					       \
> >>>> +	__wr->u.fcoe.cp_en_class = 0;					       \
> >>>> +	__wr->u.fcoe.r3_lo[0] = 0;					       \
> >>>> +	__wr->u.fcoe.r3_lo[1] = 0;					       \
> >>>> +	csio_scsi_fcp_cmnd((req), (void *)((uintptr_t)(wrp) +		       \
> >>>> +				   sizeof(struct fw_scsi_##oper##_wr)));       \
> >>>> +									       \
> >>>> +	/* Move WR pointer past command and immediate data */		       \
> >>>> +	_sgl = (struct ulptx_sgl *) ((uintptr_t)(wrp) +			       \
> >>>> +			      sizeof(struct fw_scsi_##oper##_wr) +	       \
> >>>> +			      ALIGN(_imm, 16));			               \
> >>>> +									       \
> >>>> +	/* Fill in the DSGL */						       \
> >>>> +	csio_scsi_init_ultptx_dsgl(_hw, (req), _sgl);			       \
> >>>> +									       \
> >>>> +} while (0)
> >>>> +
> >>>
> >>> This one has four uses of CPP keys.  Just turn those into macros, and
> >>> leave the rest of the code in a static function.
> >>>
> >>
> >> So what you are suggesting is to have all the lines of the macro
> >> csio_scsi_init_data_wr() added into a static function, but for the ones
> >> with the 4 keys. csio_scsi_init_data_wr() will then invoke this new
> >> function. Is that correct?
> >>
> > 
> > Not sure how the above should actually look without actually doing it,
> > but IMHO the usage of macro just obfuscates what is going on..
> > 
> > If it's only used a few times, just inline the code into seperate static
> > functions.  If it's used more than a few times, then use a single static
> > funciton with macro accessors for the assignment of the various '__wr'
> > structure members.
> > 
> > The larger problem with all of these macros is that you can't tell what
> > is a macro and what is a function.
> > 
> > If you need to use a CPP macro, please make sure to capitalize the name
> > of the macro in order to tell the difference between the two.
> > 
> 
> OK, I will see what I can do to convert this macro into a function.
> 

Also please change all of the remaining macro names to be capitalized so
someone reading the code knows the difference between function or macro.


^ permalink raw reply

* Re: [PATCH 6/8] csiostor: Chelsio FCoE offload driver submission (headers part 1).
From: Nicholas A. Bellinger @ 2012-08-25 18:40 UTC (permalink / raw)
  To: Naresh Kumar Inna
  Cc: JBottomley@parallels.com, linux-scsi@vger.kernel.org,
	Dimitrios Michailidis, netdev@vger.kernel.org, Chethan Seshadri
In-Reply-To: <503914C4.4050600@chelsio.com>

On Sat, 2012-08-25 at 23:39 +0530, Naresh Kumar Inna wrote:
> On 8/25/2012 2:47 AM, Nicholas A. Bellinger wrote:
> > On Sat, 2012-08-25 at 00:06 +0530, Naresh Kumar Inna wrote:
> >> On 8/24/2012 1:28 AM, Nicholas A. Bellinger wrote:
> >>> On Fri, 2012-08-24 at 03:57 +0530, Naresh Kumar Inna wrote:
> >>>> This patch contains the first set of the header files for csiostor driver.
> >>>>
> >>>> Signed-off-by: Naresh Kumar Inna <naresh@chelsio.com>
> >>>> ---
> >>>>  drivers/scsi/csiostor/csio_defs.h       |  143 ++++++
> >>>>  drivers/scsi/csiostor/csio_fcoe_proto.h |  843 +++++++++++++++++++++++++++++++
> >>>>  drivers/scsi/csiostor/csio_hw.h         |  668 ++++++++++++++++++++++++
> >>>>  drivers/scsi/csiostor/csio_init.h       |  158 ++++++
> >>>>  4 files changed, 1812 insertions(+), 0 deletions(-)
> >>>>  create mode 100644 drivers/scsi/csiostor/csio_defs.h
> >>>>  create mode 100644 drivers/scsi/csiostor/csio_fcoe_proto.h
> >>>>  create mode 100644 drivers/scsi/csiostor/csio_hw.h
> >>>>  create mode 100644 drivers/scsi/csiostor/csio_init.h
> >>>>
> >>>
> >>> Hi Naresh,
> >>>
> >>> Just commenting on csio_defs.h bits here...  As Robert mentioned, you'll
> >>> need to convert the driver to use (or add to) upstream protocol
> >>> definitions and drop the csio_fcoe_proto.h bits..
> >>>
> >>
> >> Hi Nicholas,
> >>
> >> I would like take up the discussion of the protocol header file in that
> >> email thread. Please find the rest of my replies inline.
> >>
> >> Thanks for reviewing,
> >> Naresh.
> >>
> >>>> diff --git a/drivers/scsi/csiostor/csio_defs.h b/drivers/scsi/csiostor/csio_defs.h
> >>>> new file mode 100644
> >>>> index 0000000..4f1c713
> >>>> --- /dev/null
> >>>> +++ b/drivers/scsi/csiostor/csio_defs.h

<SNIP>

> >>>> +static inline int
> >>>> +csio_list_deleted(struct list_head *list)
> >>>> +{
> >>>> +	return ((list->next == list) && (list->prev == list));
> >>>> +}
> >>>> +
> >>>> +#define csio_list_next(elem)	(((struct list_head *)(elem))->next)
> >>>> +#define csio_list_prev(elem)	(((struct list_head *)(elem))->prev)
> >>>> +
> >>>> +#define csio_deq_from_head(head, elem)					  \
> >>>> +do {									  \
> >>>> +	if (!list_empty(head)) {					  \
> >>>> +		*((struct list_head **)(elem)) = csio_list_next((head));  \
> >>>> +		csio_list_next((head)) =				  \
> >>>> +				csio_list_next(csio_list_next((head)));   \
> >>>> +		csio_list_prev(csio_list_next((head))) = (head);	  \
> >>>> +		INIT_LIST_HEAD(*((struct list_head **)(elem)));	          \
> >>>> +	} else								  \
> >>>> +		*((struct list_head **)(elem)) = (struct list_head *)NULL;\
> >>>> +} while (0)
> >>>> +
> >>>
> >>> This code is confusing as hell..  Why can't you just use normal list.h
> >>> macros for this..?  
> >>
> >> I have not found an equivalent function in list.h that does the above
> >> and the following macro. Could you please point me to it? I have seen a
> >> couple of other drivers define their own macros to achieve what this
> >> macro does, hence I assumed there isnt a list.h macro that does this.
> >>
> > 
> > AFAICT all that csio_deq_from_head code is supposed to do is pull an
> > item off a list, right..?  Why not just:
> > 
> >      while (!list_empty(list)) {
> >             elem = list_first_entry(list, struct elem_type, 
> >                                     elm_list);
> >             list_del_init(&elem->elm_list);
> > 
> >             <do work>
> >             <free *elem memory>
> >      }
> >
> 
> I will try to come up with a simpler static inline version of the macro.
> Would that work?

No.  The point is that the above code is a disaster, and AFAICT there is
no reason why any of it is necessary to begin with at all.

Why can't csio_deq_from_head() just become list_first_entry() +
list_del_init() to do the exact same thing without all of the extra
overhead of list_head pointer de-reference + assignments..?

--nab


^ permalink raw reply

* Re: [PATCH 5/8] csiostor: Chelsio FCoE offload driver submission (sources part 5).
From: Naresh Kumar Inna @ 2012-08-25 18:36 UTC (permalink / raw)
  To: Nicholas A. Bellinger
  Cc: JBottomley@parallels.com, linux-scsi@vger.kernel.org,
	Dimitrios Michailidis, netdev@vger.kernel.org, Chethan Seshadri
In-Reply-To: <1345841784.28432.44.camel@haakon2.linux-iscsi.org>

On 8/25/2012 2:26 AM, Nicholas A. Bellinger wrote:
> On Fri, 2012-08-24 at 23:10 +0530, Naresh Kumar Inna wrote:
>> On 8/24/2012 1:18 AM, Nicholas A. Bellinger wrote:
>>> On Fri, 2012-08-24 at 03:57 +0530, Naresh Kumar Inna wrote:
>>>> This patch contains code to implement the interrupt handling and the fast
>>>> path I/O functionality. The interrupt handling includes allocation of
>>>> MSIX vectors, registering and implemeting the interrupt service routines.
>>>> The fast path I/O functionality includes posting the I/O request to firmware
>>>> via Work Requests, tracking/completing them, and handling task management
>>>> requests. SCSI midlayer host template implementation is also covered by
>>>> this patch.
>>>>
>>>> Signed-off-by: Naresh Kumar Inna <naresh@chelsio.com>
>>>> ---
>>>
>>> Hi Naresh,
>>>
>>> My review comments are inline below..
>>
>> Hi Nicholas,
>>
>> Thanks for taking the time to review the driver. Please find my replies
>> inline.
>>
>> Regards,
>> Naresh.
>>
>>>
>>>>  drivers/scsi/csiostor/csio_isr.c  |  631 ++++++++++
>>>>  drivers/scsi/csiostor/csio_scsi.c | 2498 +++++++++++++++++++++++++++++++++++++
>>>>  2 files changed, 3129 insertions(+), 0 deletions(-)
>>>>  create mode 100644 drivers/scsi/csiostor/csio_isr.c
>>>>  create mode 100644 drivers/scsi/csiostor/csio_scsi.c
>>>>
> 
> <SNIP>
> 
>>>
>>>> diff --git a/drivers/scsi/csiostor/csio_scsi.c b/drivers/scsi/csiostor/csio_scsi.c
>>>> new file mode 100644
>>>> index 0000000..0f87b00
>>>> --- /dev/null
>>>> +++ b/drivers/scsi/csiostor/csio_scsi.c
>>>> +
>>>> +#define CSIO_SCSI_CMD_WR_SZ(_imm)					\
>>>> +	(sizeof(struct fw_scsi_cmd_wr) +		/* WR size */	\
>>>> +	 ALIGN((_imm), 16))				/* Immed data */
>>>> +
>>>> +#define CSIO_SCSI_CMD_WR_SZ_16(_imm)					\
>>>> +			(ALIGN(CSIO_SCSI_CMD_WR_SZ((_imm)), 16))
>>>> +
>>>> +/*
>>>> + * csio_scsi_cmd - Create a SCSI CMD WR.
>>>> + * @req: IO req structure.
>>>> + *
>>>> + * Gets a WR slot in the ingress queue and initializes it with SCSI CMD WR.
>>>> + *
>>>> + */
>>>> +static inline void
>>>> +csio_scsi_cmd(struct csio_ioreq *req)
>>>> +{
>>>> +	struct csio_wr_pair wrp;
>>>> +	struct csio_hw *hw = req->lnode->hwp;
>>>> +	struct csio_scsim *scsim = csio_hw_to_scsim(hw);
>>>> +	uint32_t size = CSIO_SCSI_CMD_WR_SZ_16(scsim->proto_cmd_len);
>>>> +
>>>> +	req->drv_status = csio_wr_get(hw, req->eq_idx, size, &wrp);
>>>> +	if (unlikely(req->drv_status != CSIO_SUCCESS))
>>>> +		return;
>>>> +
>>>> +	if (wrp.size1 >= size) {
>>>> +		/* Initialize WR in one shot */
>>>> +		csio_scsi_init_cmd_wr(req, wrp.addr1, size);
>>>> +	} else {
>>>> +		uint8_t tmpwr[512];
>>>
>>> Mmmm, putting this large of a buffer on the local stack is probably not
>>> a good idea.
>>>
>>> This should become an allocation..  If it's a hot path then you'll
>>> probably want to set this up before-hand.
>>>
>>
>> The else switch above is entered only when we near the end of the DMA
>> ring. This is not a frequent occurrence. If it is a strict no-no to have
>> so many on-stack bytes, I have to think of a way re-work it to use
>> pre-allocated memory. Please let me know.
>>
> 
> Considering it's used a number of times, it would be better to just
> figure out a sensible manner to pre-allocate this, especially if it's
> only a single occurrence to an individual ring held under a lock. 
> 

I will see what I can do - I can probably add these bytes into every
queues metadata structure.

>>>> +		/*
>>>> +		 * Make a temporary copy of the WR and write back
>>>> +		 * the copy into the WR pair.
>>>> +		 */
>>>> +		csio_scsi_init_cmd_wr(req, (void *)tmpwr, size);
>>>> +		memcpy(wrp.addr1, tmpwr, wrp.size1);
>>>> +		memcpy(wrp.addr2, tmpwr + wrp.size1, size - wrp.size1);
>>>> +	}
>>>> +}
>>>> +
>>>> +/*
>>>> + * The following is fast path code. Therefore it is inlined with multi-line
>>>> + * macros using name substitution, thus avoiding if-else switches for
>>>> + * operation (read/write), as well as serving the purpose of code re-use.
>>>> + */
>>>> +/*
>>>> + * csio_scsi_init_ulptx_dsgl - Fill in a ULP_TX_SC_DSGL
>>>> + * @hw: HW module
>>>> + * @req: IO request
>>>> + * @sgl: ULP TX SGL pointer.
>>>> + *
>>>> + */
>>>> +#define csio_scsi_init_ultptx_dsgl(hw, req, sgl)			       \
>>>> +do {									       \
>>>> +	struct ulptx_sge_pair *_sge_pair = NULL;			       \
>>>> +	struct scatterlist *_sgel;					       \
>>>> +	uint32_t _i = 0;						       \
>>>> +	uint32_t _xfer_len;						       \
>>>> +	struct list_head *_tmp;						       \
>>>> +	struct csio_dma_buf *_dma_buf;					       \
>>>> +	struct scsi_cmnd *scmnd = csio_scsi_cmnd((req));		       \
>>>> +									       \
>>>> +	(sgl)->cmd_nsge = htonl(ULPTX_CMD(ULP_TX_SC_DSGL) | ULPTX_MORE |       \
>>>> +				     ULPTX_NSGE((req)->nsge));		       \
>>>> +	/* Now add the data SGLs */					       \
>>>> +	if (likely(!(req)->dcopy)) {				               \
>>>> +		scsi_for_each_sg(scmnd, _sgel, (req)->nsge, _i) {	       \
>>>> +			if (_i == 0) {					       \
>>>> +				(sgl)->addr0 = cpu_to_be64(	               \
>>>> +						sg_dma_address(_sgel));	       \
>>>> +				(sgl)->len0 = cpu_to_be32(		       \
>>>> +						sg_dma_len(_sgel));	       \
>>>> +				_sge_pair =				       \
>>>> +					(struct ulptx_sge_pair *)((sgl) + 1);  \
>>>> +				continue;				       \
>>>> +			}						       \
>>>> +			if ((_i - 1) & 0x1) {				       \
>>>> +				_sge_pair->addr[1] = cpu_to_be64(	       \
>>>> +						sg_dma_address(_sgel));	       \
>>>> +				_sge_pair->len[1] = cpu_to_be32(	       \
>>>> +						sg_dma_len(_sgel));	       \
>>>> +				_sge_pair++;				       \
>>>> +			} else	{					       \
>>>> +				_sge_pair->addr[0] = cpu_to_be64(	       \
>>>> +						sg_dma_address(_sgel));	       \
>>>> +				_sge_pair->len[0] = cpu_to_be32(	       \
>>>> +						sg_dma_len(_sgel));	       \
>>>> +			}						       \
>>>> +		}							       \
>>>> +	} else {							       \
>>>> +		/* Program sg elements with driver's DDP buffer */	       \
>>>> +		_xfer_len = scsi_bufflen(scmnd);			       \
>>>> +		list_for_each(_tmp, &(req)->gen_list) {		       \
>>>> +			_dma_buf = (struct csio_dma_buf *)_tmp;		       \
>>>> +			if (_i == 0) {					       \
>>>> +				(sgl)->addr0 = cpu_to_be64(_dma_buf->paddr);   \
>>>> +				(sgl)->len0 = cpu_to_be32(		       \
>>>> +					min(_xfer_len, _dma_buf->len));        \
>>>> +				_sge_pair =				       \
>>>> +					(struct ulptx_sge_pair *)((sgl) + 1);  \
>>>> +			}						       \
>>>> +			else if ((_i - 1) & 0x1) {			       \
>>>> +				_sge_pair->addr[1] = cpu_to_be64(	       \
>>>> +							_dma_buf->paddr);      \
>>>> +				_sge_pair->len[1] = cpu_to_be32(	       \
>>>> +					min(_xfer_len, _dma_buf->len));        \
>>>> +				_sge_pair++;				       \
>>>> +			} else	{					       \
>>>> +				_sge_pair->addr[0] = cpu_to_be64(	       \
>>>> +							_dma_buf->paddr);      \
>>>> +				_sge_pair->len[0] = cpu_to_be32(	       \
>>>> +					min(_xfer_len, _dma_buf->len));        \
>>>> +			}						       \
>>>> +			_xfer_len -= min(_xfer_len, _dma_buf->len);            \
>>>> +			_i++;						       \
>>>> +		}							       \
>>>> +	}								       \
>>>> +} while (0)
>>>> +
>>>
>>> I don't see any reason why this can't just be a static function..?  Why
>>> is the macro usage necessary here..?
>>
>> OK, I will make this static-inline.
>>
>>>
>>>> +/*
>>>> + * csio_scsi_init_data_wr - Initialize the READ/WRITE SCSI WR.
>>>> + * @req: IO req structure.
>>>> + * @oper: read/write
>>>> + * @wrp: DMA location to place the payload.
>>>> + * @size: Size of WR (including FW WR + immed data + rsp SG entry + data SGL
>>>> + * @wrop:  _READ_/_WRITE_
>>>> + *
>>>> + * Wrapper for populating fw_scsi_read_wr/fw_scsi_write_wr.
>>>> + */
>>>> +#define csio_scsi_init_data_wr(req, oper, wrp, size, wrop)		       \
>>>> +do {									       \
>>>> +	struct csio_hw *_hw = (req)->lnode->hwp;			       \
>>>> +	struct csio_rnode *_rn = (req)->rnode;				       \
>>>> +	struct fw_scsi_##oper##_wr *__wr = (struct fw_scsi_##oper##_wr *)(wrp);\
>>>> +	struct ulptx_sgl *_sgl;						       \
>>>> +	struct csio_dma_buf *_dma_buf;					       \
>>>> +	uint8_t _imm = csio_hw_to_scsim(_hw)->proto_cmd_len;		       \
>>>> +	struct scsi_cmnd *scmnd = csio_scsi_cmnd((req));		       \
>>>> +									       \
>>>> +	__wr->op_immdlen = cpu_to_be32(FW_WR_OP(FW_SCSI##wrop##WR) |           \
>>>> +					   FW_SCSI##wrop##WR_IMMDLEN(_imm));   \
>>>> +	__wr->flowid_len16 = cpu_to_be32(FW_WR_FLOWID(_rn->flowid) |           \
>>>> +					     FW_WR_LEN16(		       \
>>>> +						CSIO_ROUNDUP((size), 16)));    \
>>>> +	__wr->cookie = (uintptr_t) (req);				       \
>>>> +	__wr->iqid = (uint16_t)cpu_to_be16(csio_q_physiqid(_hw,	               \
>>>> +							       (req)->iq_idx));\
>>>> +	__wr->tmo_val = (uint8_t)((req)->tmo);				       \
>>>> +	__wr->use_xfer_cnt = 1;						       \
>>>> +	__wr->xfer_cnt = cpu_to_be32(scsi_bufflen(scmnd));		       \
>>>> +	__wr->ini_xfer_cnt = cpu_to_be32(scsi_bufflen(scmnd));		       \
>>>> +	/* Get RSP DMA buffer */					       \
>>>> +	_dma_buf = &(req)->dma_buf;					       \
>>>> +									       \
>>>> +	/* Prepare RSP SGL */						       \
>>>> +	__wr->rsp_dmalen = cpu_to_be32(_dma_buf->len);		               \
>>>> +	__wr->rsp_dmaaddr = cpu_to_be64(_dma_buf->paddr);		       \
>>>> +									       \
>>>> +	__wr->r4 = 0;							       \
>>>> +									       \
>>>> +	__wr->u.fcoe.ctl_pri = 0;					       \
>>>> +	__wr->u.fcoe.cp_en_class = 0;					       \
>>>> +	__wr->u.fcoe.r3_lo[0] = 0;					       \
>>>> +	__wr->u.fcoe.r3_lo[1] = 0;					       \
>>>> +	csio_scsi_fcp_cmnd((req), (void *)((uintptr_t)(wrp) +		       \
>>>> +				   sizeof(struct fw_scsi_##oper##_wr)));       \
>>>> +									       \
>>>> +	/* Move WR pointer past command and immediate data */		       \
>>>> +	_sgl = (struct ulptx_sgl *) ((uintptr_t)(wrp) +			       \
>>>> +			      sizeof(struct fw_scsi_##oper##_wr) +	       \
>>>> +			      ALIGN(_imm, 16));			               \
>>>> +									       \
>>>> +	/* Fill in the DSGL */						       \
>>>> +	csio_scsi_init_ultptx_dsgl(_hw, (req), _sgl);			       \
>>>> +									       \
>>>> +} while (0)
>>>> +
>>>
>>> This one has four uses of CPP keys.  Just turn those into macros, and
>>> leave the rest of the code in a static function.
>>>
>>
>> So what you are suggesting is to have all the lines of the macro
>> csio_scsi_init_data_wr() added into a static function, but for the ones
>> with the 4 keys. csio_scsi_init_data_wr() will then invoke this new
>> function. Is that correct?
>>
> 
> Not sure how the above should actually look without actually doing it,
> but IMHO the usage of macro just obfuscates what is going on..
> 
> If it's only used a few times, just inline the code into seperate static
> functions.  If it's used more than a few times, then use a single static
> funciton with macro accessors for the assignment of the various '__wr'
> structure members.
> 
> The larger problem with all of these macros is that you can't tell what
> is a macro and what is a function.
> 
> If you need to use a CPP macro, please make sure to capitalize the name
> of the macro in order to tell the difference between the two.
> 

OK, I will see what I can do to convert this macro into a function.

>>>> +/* Calculate WR size needed for fw_scsi_read_wr/fw_scsi_write_wr */
>>>> +#define csio_scsi_data_wrsz(req, oper, sz, imm)				       \
>>>> +do {									       \
>>>> +	(sz) = sizeof(struct fw_scsi_##oper##_wr) +	/* WR size */          \
>>>> +	       ALIGN((imm), 16) +			/* Immed data */       \
>>>> +	       sizeof(struct ulptx_sgl);		/* ulptx_sgl */	       \
>>>> +									       \
>>>> +	if (unlikely((req)->nsge > 1))				               \
>>>> +		(sz) += (sizeof(struct ulptx_sge_pair) *		       \
>>>> +				(ALIGN(((req)->nsge - 1), 2) / 2));            \
>>>> +							/* Data SGE */	       \
>>>> +} while (0)
>>>> +
>>>> +/*
>>>> + * csio_scsi_data - Create a SCSI WRITE/READ WR.
>>>> + * @req: IO req structure.
>>>> + * @oper: read/write
>>>> + * @wrop:  _READ_/_WRITE_ (string subsitutions to use with the FW bit field
>>>> + *         macros).
>>>> + *
>>>> + * Gets a WR slot in the ingress queue and initializes it with
>>>> + * SCSI CMD READ/WRITE WR.
>>>> + *
>>>> + */
>>>> +#define csio_scsi_data(req, oper, wrop)					       \
>>>> +do {									       \
>>>> +	struct csio_wr_pair _wrp;					       \
>>>> +	uint32_t _size;							       \
>>>> +	struct csio_hw *_hw = (req)->lnode->hwp;			       \
>>>> +	struct csio_scsim *_scsim = csio_hw_to_scsim(_hw);		       \
>>>> +									       \
>>>> +	csio_scsi_data_wrsz((req), oper, _size, _scsim->proto_cmd_len);	       \
>>>> +	_size = ALIGN(_size, 16);					       \
>>>> +									       \
>>>> +	(req)->drv_status = csio_wr_get(_hw, (req)->eq_idx, _size, &_wrp);     \
>>>> +	if (likely((req)->drv_status == CSIO_SUCCESS)) {		       \
>>>> +		if (likely(_wrp.size1 >= _size)) {			       \
>>>> +			/* Initialize WR in one shot */			       \
>>>> +			csio_scsi_init_data_wr((req), oper, _wrp.addr1,        \
>>>> +						    _size, wrop);	       \
>>>> +		} else {						       \
>>>> +			uint8_t tmpwr[512];				       \
>>>> +			/*						       \
>>>> +			 * Make a temporary copy of the WR and write back      \
>>>> +			 * the copy into the WR pair.			       \
>>>> +			 */						       \
>>>> +			csio_scsi_init_data_wr((req), oper, (void *)tmpwr,     \
>>>> +						    _size, wrop);	       \
>>>> +			memcpy(_wrp.addr1, tmpwr, _wrp.size1);	               \
>>>> +			memcpy(_wrp.addr2, tmpwr + _wrp.size1,	               \
>>>> +				    _size - _wrp.size1);		       \
>>>> +		}							       \
>>>> +	}								       \
>>>> +} while (0)
>>>> +
>>>
>>> Ditto on this one, along with the tmpwr[512] stack usage..
>>>
>>>> +static inline void
>>>> +csio_scsi_abrt_cls(struct csio_ioreq *req, bool abort)
>>>> +{
>>>> +	struct csio_wr_pair wrp;
>>>> +	struct csio_hw *hw = req->lnode->hwp;
>>>> +	uint32_t size = ALIGN(sizeof(struct fw_scsi_abrt_cls_wr), 16);
>>>> +
>>>> +	req->drv_status = csio_wr_get(hw, req->eq_idx, size, &wrp);
>>>> +	if (req->drv_status != CSIO_SUCCESS)
>>>> +		return;
>>>> +
>>>> +	if (wrp.size1 >= size) {
>>>> +		/* Initialize WR in one shot */
>>>> +		csio_scsi_init_abrt_cls_wr(req, wrp.addr1, size, abort);
>>>> +	} else {
>>>> +		uint8_t tmpwr[512];
>>>
>>> Ditto here on local scope stack usage..
>>>
>>>> +		/*
>>>> +		 * Make a temporary copy of the WR and write back
>>>> +		 * the copy into the WR pair.
>>>> +		 */
>>>> +		csio_scsi_init_abrt_cls_wr(req, (void *)tmpwr, size, abort);
>>>> +		memcpy(wrp.addr1, tmpwr, wrp.size1);
>>>> +		memcpy(wrp.addr2, tmpwr + wrp.size1, size - wrp.size1);
>>>> +	}
>>>> +}
>>>> +
>>>> +/*****************************************************************************/
>>>> +/* START: SCSI SM                                                            */
>>>> +/*****************************************************************************/
>>>> +static void
>>>> +csio_scsis_uninit(struct csio_ioreq *req, enum csio_scsi_ev evt)
>>>> +{
>>>> +	struct csio_hw *hw = req->lnode->hwp;
>>>> +	struct csio_scsim *scsim = csio_hw_to_scsim(hw);
>>>> +
>>>> +	switch (evt) {
>>>> +
>>>> +	case CSIO_SCSIE_START_IO:
>>>
>>> Extra space between start of first switch case
>>
>> OK, I will remove it. Is there any tool that catches such deviations?
>> checkpath.pl didnt report it.
>>
> 
> Sorry, can't help you there..  ;)
> 
>>>
>>>> +
>>>> +/**
>>>> + * csio_queuecommand_lck - Entry point to kickstart an I/O request.
>>>> + * @cmnd:	The I/O request from ML.
>>>> + * @done:	The ML callback routine.
>>>> + *
>>>> + * This routine does the following:
>>>> + *	- Checks for HW and Rnode module readiness.
>>>> + *	- Gets a free ioreq structure (which is already initialized
>>>> + *	  to uninit during its allocation).
>>>> + *	- Maps SG elements.
>>>> + *	- Initializes ioreq members.
>>>> + *	- Kicks off the SCSI state machine for this IO.
>>>> + *	- Returns busy status on error.
>>>> + */
>>>> +static int
>>>> +csio_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done)(struct scsi_cmnd *))
>>>> +{
>>>> +	struct csio_lnode *ln = shost_priv(cmnd->device->host);
>>>> +	struct csio_hw *hw = csio_lnode_to_hw(ln);
>>>> +	struct csio_scsim *scsim = csio_hw_to_scsim(hw);
>>>> +	struct csio_rnode *rn = (struct csio_rnode *)(cmnd->device->hostdata);
>>>> +	struct csio_ioreq *ioreq = NULL;
>>>> +	unsigned long flags;
>>>> +	int nsge = 0;
>>>> +	int rv = SCSI_MLQUEUE_HOST_BUSY, nr;
>>>> +	csio_retval_t retval;
>>>> +	int cpu;
>>>> +	struct csio_scsi_qset *sqset;
>>>> +	struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device));
>>>> +
>>>> +	if (!blk_rq_cpu_valid(cmnd->request))
>>>> +		cpu = smp_processor_id();
>>>> +	else
>>>> +		cpu = cmnd->request->cpu;
>>>> +
>>>> +	sqset = &hw->sqset[ln->portid][cpu];
>>>> +
>>>> +	nr = fc_remote_port_chkready(rport);
>>>> +	if (nr) {
>>>> +		cmnd->result = nr;
>>>> +		csio_inc_stats(scsim, n_rn_nr_error);
>>>> +		goto err_done;
>>>> +	}
>>>> +
>>>> +	if (unlikely(!csio_is_hw_ready(hw))) {
>>>> +		cmnd->result = (DID_REQUEUE << 16);
>>>> +		csio_inc_stats(scsim, n_hw_nr_error);
>>>> +		goto err_done;
>>>> +	}
>>>> +
>>>> +	/* Get req->nsge, if there are SG elements to be mapped  */
>>>> +	nsge = scsi_dma_map(cmnd);
>>>> +	if (unlikely(nsge < 0)) {
>>>> +		csio_inc_stats(scsim, n_dmamap_error);
>>>> +		goto err;
>>>> +	}
>>>> +
>>>> +	/* Do we support so many mappings? */
>>>> +	if (unlikely(nsge > scsim->max_sge)) {
>>>> +		csio_warn(hw,
>>>> +			  "More SGEs than can be supported."
>>>> +			  " SGEs: %d, Max SGEs: %d\n", nsge, scsim->max_sge);
>>>> +		csio_inc_stats(scsim, n_unsupp_sge_error);
>>>> +		goto err_dma_unmap;
>>>> +	}
>>>> +
>>>> +	/* Get a free ioreq structure - SM is already set to uninit */
>>>> +	ioreq = csio_get_scsi_ioreq_lock(hw, scsim);
>>>> +	if (!ioreq) {
>>>> +		csio_err(hw, "Out of I/O request elements. Active #:%d\n",
>>>> +			 scsim->stats.n_active);
>>>> +		csio_inc_stats(scsim, n_no_req_error);
>>>> +		goto err_dma_unmap;
>>>> +	}
>>>> +
>>>> +	ioreq->nsge		= nsge;
>>>> +	ioreq->lnode		= ln;
>>>> +	ioreq->rnode		= rn;
>>>> +	ioreq->iq_idx		= sqset->iq_idx;
>>>> +	ioreq->eq_idx		= sqset->eq_idx;
>>>> +	ioreq->wr_status	= 0;
>>>> +	ioreq->drv_status	= CSIO_SUCCESS;
>>>> +	csio_scsi_cmnd(ioreq)	= (void *)cmnd;
>>>> +	ioreq->tmo		= 0;
>>>> +
>>>> +	switch (cmnd->sc_data_direction) {
>>>> +	case DMA_BIDIRECTIONAL:
>>>> +		ioreq->datadir = CSIO_IOREQF_DMA_BIDI;
>>>> +		csio_inc_stats(ln, n_control_requests);
>>>> +		break;
>>>> +	case DMA_TO_DEVICE:
>>>> +		ioreq->datadir = CSIO_IOREQF_DMA_WRITE;
>>>> +		csio_inc_stats(ln, n_output_requests);
>>>> +		ln->stats.n_output_bytes += scsi_bufflen(cmnd);
>>>> +		break;
>>>> +	case DMA_FROM_DEVICE:
>>>> +		ioreq->datadir = CSIO_IOREQF_DMA_READ;
>>>> +		csio_inc_stats(ln, n_input_requests);
>>>> +		ln->stats.n_input_bytes += scsi_bufflen(cmnd);
>>>> +		break;
>>>> +	case DMA_NONE:
>>>> +		ioreq->datadir = CSIO_IOREQF_DMA_NONE;
>>>> +		csio_inc_stats(ln, n_control_requests);
>>>> +		break;
>>>> +	default:
>>>> +		CSIO_DB_ASSERT(0);
>>>> +		break;
>>>> +	}
>>>> +
>>>> +	/* Set cbfn */
>>>> +	ioreq->io_cbfn = csio_scsi_cbfn;
>>>> +
>>>> +	/* Needed during abort */
>>>> +	cmnd->host_scribble = (unsigned char *)ioreq;
>>>> +	cmnd->scsi_done = done;
>>>> +	cmnd->SCp.Message = 0;
>>>> +
>>>> +	/* Kick off SCSI IO SM on the ioreq */
>>>> +	spin_lock_irqsave(&hw->lock, flags);
>>>> +	retval = csio_scsi_start_io(ioreq);
>>>> +	spin_unlock_irqrestore(&hw->lock, flags);
>>>> +
>>>> +	if (retval != CSIO_SUCCESS) {
>>>> +		csio_err(hw, "ioreq: %p couldnt be started, status:%d\n",
>>>> +			 ioreq, retval);
>>>> +		csio_inc_stats(scsim, n_busy_error);
>>>> +		goto err_put_req;
>>>> +	}
>>>> +
>>>> +	return 0;
>>>> +
>>>> +err_put_req:
>>>> +	csio_put_scsi_ioreq_lock(hw, scsim, ioreq);
>>>> +err_dma_unmap:
>>>> +	if (nsge > 0)
>>>> +		scsi_dma_unmap(cmnd);
>>>> +err:
>>>> +	return rv;
>>>> +
>>>> +err_done:
>>>> +	done(cmnd);
>>>> +	return 0;
>>>> +}
>>>> +
>>>> +static DEF_SCSI_QCMD(csio_queuecommand);
>>>> +
>>>
>>> This means that your running with the host_lock held..  I'm not sure if
>>> that is really what you want to do as it really end's up killing
>>> multi-lun small packet performance..
>>>
>>> How about dropping DEF_SCSI_QCMD usage here, and figure out what
>>> actually needs to be protected by the SCSI host_lock within
>>> csio_queuecommand_lck()..?
>>
>> It is on my TODO list for the next version of the driver, after the
>> initial submission. Per the current design, we shouldnt need the
>> host_lock to be held, but I would like to test this change thoroughly
>> before I submit it.
>>
> 
> Sure, it's really quite easy to convert and these days the majority of
> high performance LLDs do run in host-lock-less mode.
> 
> IIRC the libfc based FCoE initiator driver is doing this too..
> 


^ permalink raw reply

* Re: [PATCH 6/8] csiostor: Chelsio FCoE offload driver submission (headers part 1).
From: Naresh Kumar Inna @ 2012-08-25 18:09 UTC (permalink / raw)
  To: Nicholas A. Bellinger
  Cc: JBottomley@parallels.com, linux-scsi@vger.kernel.org,
	Dimitrios Michailidis, netdev@vger.kernel.org, Chethan Seshadri
In-Reply-To: <1345843042.28432.65.camel@haakon2.linux-iscsi.org>

On 8/25/2012 2:47 AM, Nicholas A. Bellinger wrote:
> On Sat, 2012-08-25 at 00:06 +0530, Naresh Kumar Inna wrote:
>> On 8/24/2012 1:28 AM, Nicholas A. Bellinger wrote:
>>> On Fri, 2012-08-24 at 03:57 +0530, Naresh Kumar Inna wrote:
>>>> This patch contains the first set of the header files for csiostor driver.
>>>>
>>>> Signed-off-by: Naresh Kumar Inna <naresh@chelsio.com>
>>>> ---
>>>>  drivers/scsi/csiostor/csio_defs.h       |  143 ++++++
>>>>  drivers/scsi/csiostor/csio_fcoe_proto.h |  843 +++++++++++++++++++++++++++++++
>>>>  drivers/scsi/csiostor/csio_hw.h         |  668 ++++++++++++++++++++++++
>>>>  drivers/scsi/csiostor/csio_init.h       |  158 ++++++
>>>>  4 files changed, 1812 insertions(+), 0 deletions(-)
>>>>  create mode 100644 drivers/scsi/csiostor/csio_defs.h
>>>>  create mode 100644 drivers/scsi/csiostor/csio_fcoe_proto.h
>>>>  create mode 100644 drivers/scsi/csiostor/csio_hw.h
>>>>  create mode 100644 drivers/scsi/csiostor/csio_init.h
>>>>
>>>
>>> Hi Naresh,
>>>
>>> Just commenting on csio_defs.h bits here...  As Robert mentioned, you'll
>>> need to convert the driver to use (or add to) upstream protocol
>>> definitions and drop the csio_fcoe_proto.h bits..
>>>
>>
>> Hi Nicholas,
>>
>> I would like take up the discussion of the protocol header file in that
>> email thread. Please find the rest of my replies inline.
>>
>> Thanks for reviewing,
>> Naresh.
>>
>>>> diff --git a/drivers/scsi/csiostor/csio_defs.h b/drivers/scsi/csiostor/csio_defs.h
>>>> new file mode 100644
>>>> index 0000000..4f1c713
>>>> --- /dev/null
>>>> +++ b/drivers/scsi/csiostor/csio_defs.h
> 
> <SNIP>
> 
>>>> +#ifndef __CSIO_DEFS_H__
>>>> +#define __CSIO_DEFS_H__
>>>> +
>>>> +#include <linux/kernel.h>
>>>> +#include <linux/timer.h>
>>>> +#include <linux/list.h>
>>>> +#include <linux/bug.h>
>>>> +#include <linux/pci.h>
>>>> +#include <linux/jiffies.h>
>>>> +
>>>> +/* Function returns */
>>>> +enum csio_retval {
>>>> +	CSIO_SUCCESS = 0,
>>>> +	CSIO_INVAL = 1,
>>>> +	CSIO_BUSY = 2,
>>>> +	CSIO_NOSUPP = 3,
>>>> +	CSIO_TIMEOUT = 4,
>>>> +	CSIO_NOMEM = 5,
>>>> +	CSIO_NOPERM = 6,
>>>> +	CSIO_RETRY = 7,
>>>> +	CSIO_EPROTO = 8,
>>>> +	CSIO_EIO = 9,
>>>> +	CSIO_CANCELLED = 10,
>>>> +};
>>>> +
>>>
>>> Please don't assign macros for errno's, and give them positive values.
>>>
>>
>> Although some of these return values appear to be mapped to errno
>> values, there are others that do not have an errno equivalent (example
>> CSIO_CANCELLED). We may have future needs to have more driver/protocol
>> specific return values as well. What do you suggest?
>>
> 
> Convert all functions aside from CSIO_CANCELLED to use normal negative
> return values from include/asm-generic/error[-base].h
> 
> For the CSIO_CANCELLED case, propagate this status up to the specific
> caller using another method..
> 
>>>> +#define csio_retval_t enum csio_retval
>>>
>>> Please get rid of this csio_retval_t nonsense.
>>
>> I can get rid of the typedef and use enum csio_retval instead.
>>
> 
> Using a LLD defined retval where %90 of the items are from errno.h is
> code duplication.  Please get rid of this.
> 

OK I will switch over to the errno values.

>>>
>>>> +
>>>> +enum {
>>>> +	CSIO_FALSE = 0,
>>>> +	CSIO_TRUE = 1,
>>>> +};
>>>> +
>>>
>>> Same here, please use normal Boolean macros
>>>
>>>> +#define CSIO_ROUNDUP(__v, __r)		(((__v) + (__r) - 1) / (__r))
>>>> +#define CSIO_INVALID_IDX		0xFFFFFFFF
>>>> +#define csio_inc_stats(elem, val)	((elem)->stats.val++)
>>>> +#define csio_dec_stats(elem, val)	((elem)->stats.val--)
>>>
>>> No reason for either of this stats inc+dec macros.  Please drop them.
>>
>> I will get rid of them.
>>
>>>
>>>> +#define csio_valid_wwn(__n)		((*__n >> 4) == 0x5 ? CSIO_TRUE : \
>>>> +						CSIO_FALSE)
>>>> +#define CSIO_WORD_TO_BYTE		4
>>>> +
>>>> +static inline int
>>>> +csio_list_deleted(struct list_head *list)
>>>> +{
>>>> +	return ((list->next == list) && (list->prev == list));
>>>> +}
>>>> +
>>>> +#define csio_list_next(elem)	(((struct list_head *)(elem))->next)
>>>> +#define csio_list_prev(elem)	(((struct list_head *)(elem))->prev)
>>>> +
>>>> +#define csio_deq_from_head(head, elem)					  \
>>>> +do {									  \
>>>> +	if (!list_empty(head)) {					  \
>>>> +		*((struct list_head **)(elem)) = csio_list_next((head));  \
>>>> +		csio_list_next((head)) =				  \
>>>> +				csio_list_next(csio_list_next((head)));   \
>>>> +		csio_list_prev(csio_list_next((head))) = (head);	  \
>>>> +		INIT_LIST_HEAD(*((struct list_head **)(elem)));	          \
>>>> +	} else								  \
>>>> +		*((struct list_head **)(elem)) = (struct list_head *)NULL;\
>>>> +} while (0)
>>>> +
>>>
>>> This code is confusing as hell..  Why can't you just use normal list.h
>>> macros for this..?  
>>
>> I have not found an equivalent function in list.h that does the above
>> and the following macro. Could you please point me to it? I have seen a
>> couple of other drivers define their own macros to achieve what this
>> macro does, hence I assumed there isnt a list.h macro that does this.
>>
> 
> AFAICT all that csio_deq_from_head code is supposed to do is pull an
> item off a list, right..?  Why not just:
> 
>      while (!list_empty(list)) {
>             elem = list_first_entry(list, struct elem_type, 
>                                     elm_list);
>             list_del_init(&elem->elm_list);
> 
>             <do work>
>             <free *elem memory>
>      }
>

I will try to come up with a simpler static inline version of the macro.
Would that work?

>>>> +#define csio_deq_from_tail(head, elem)					  \
>>>> +do {									  \
>>>> +	if (!list_empty(head)) {					  \
>>>> +		*((struct list_head **)(elem)) = csio_list_prev((head));  \
>>>> +		csio_list_prev((head)) =				  \
>>>> +				csio_list_prev(csio_list_prev((head)));	  \
>>>> +		csio_list_next(csio_list_prev((head))) = (head);	  \
>>>> +		INIT_LIST_HEAD(*((struct list_head **)(elem)));		  \
>>>> +	} else								  \
>>>> +		*((struct list_head **)(elem)) = (struct list_head *)NULL;\
>>>> +} while (0)
>>>> +
>>>
>>> Same here..  Please don't use macros like this.
>>>
> 
> AFIACT csio_deq_from_tail is unused..?
> 
> Please remove it..
> 

I will remove it.

^ permalink raw reply

* Re: BUG: soft lockup - CPU#6 stuck for 22s! [httpd2-event:15597]
From: Eric Dumazet @ 2012-08-25 17:52 UTC (permalink / raw)
  To: Cristian Rodríguez; +Cc: netdev, Yuchung Cheng, Neal Cardwell
In-Reply-To: <1345895225.19483.447.camel@edumazet-glaptop>

On Sat, 2012-08-25 at 13:47 +0200, Eric Dumazet wrote:
> On Sat, 2012-08-25 at 11:14 +0200, Eric Dumazet wrote:
> > From: Eric Dumazet <edumazet@google.com>
> > 
> > On Sat, 2012-08-25 at 10:59 +0200, Eric Dumazet wrote:
> > > On Fri, 2012-08-24 at 20:50 -0400, Cristian Rodríguez wrote:
> > > > Hi, the issue I reported with IPV6 few weeks ago seems to be gone, but
> > > > now I am getting the following crash..
> > 
> > > Oh, I now see the bug, I'll send a patch asap
> > 
> > Please try the following fix.
> > 
> > Thanks !
> 
> Well, this v2 seems cleaner :
> 
> [PATCH v2] tcp: tcp_slow_start() should not decrease snd_cwnd
> 
> Cristian Rodríguez reported various lockups in TCP stack,
> introduced by commit 9dc274151a548 (tcp: fix ABC in tcp_slow_start())
> 
> We could exit tcp_slow_start() with a zeroed snd_cwnd,
> and next time we enter tcp_slow_start(), we run an infinite loop.
> 
> Reported-by: Cristian Rodríguez <crrodriguez@opensuse.org>
> Cc: Yuchung Cheng <ycheng@google.com>
> Cc: Neal Cardwell <ncardwell@google.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
>  net/ipv4/tcp_cong.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
> index 1432cdb..e656c72 100644
> --- a/net/ipv4/tcp_cong.c
> +++ b/net/ipv4/tcp_cong.c
> @@ -337,7 +337,7 @@ void tcp_slow_start(struct tcp_sock *tp)
>  		tp->snd_cwnd_cnt -= tp->snd_cwnd;
>  		delta++;
>  	}
> -	tp->snd_cwnd = min(tp->snd_cwnd + delta, tp->snd_cwnd_clamp);
> +	tp->snd_cwnd = clamp(tp->snd_cwnd + delta, tp->snd_cwnd, tp->snd_cwnd_clamp);
>  }
>  EXPORT_SYMBOL_GPL(tcp_slow_start);
>  
> 

Hmm...

We probably have a bug in tcp_metrics.c, because snd_cwnd_clamp should
not be zero.

With RCU, it seems following code in tcpm_new() is racy :

tm->tcpm_addr = *addr;
...
tcpm_suck_dst(tm, dst);

Coupled with the code in tcpm_suck_dst(tm, dst) 

static void tcpm_suck_dst(struct tcp_metrics_block *tm, struct dst_entry *dst)
{
        u32 val;

        tm->tcpm_stamp = jiffies;

        val = 0;
        if (dst_metric_locked(dst, RTAX_RTT))
                val |= 1 << TCP_METRIC_RTT;
        if (dst_metric_locked(dst, RTAX_RTTVAR))
                val |= 1 << TCP_METRIC_RTTVAR;
        if (dst_metric_locked(dst, RTAX_SSTHRESH))
                val |= 1 << TCP_METRIC_SSTHRESH;
        if (dst_metric_locked(dst, RTAX_CWND))
                val |= 1 << TCP_METRIC_CWND;
        if (dst_metric_locked(dst, RTAX_REORDERING))
                val |= 1 << TCP_METRIC_REORDERING;
        tm->tcpm_lock = val;

// HERE we set tcpm_lock before the tcpm_vals[]

        tm->tcpm_vals[TCP_METRIC_RTT] = dst_metric_raw(dst, RTAX_RTT);
        tm->tcpm_vals[TCP_METRIC_RTTVAR] = dst_metric_raw(dst, RTAX_RTTVAR);
        tm->tcpm_vals[TCP_METRIC_SSTHRESH] = dst_metric_raw(dst, RTAX_SSTHRESH);
        tm->tcpm_vals[TCP_METRIC_CWND] = dst_metric_raw(dst, RTAX_CWND);
        tm->tcpm_vals[TCP_METRIC_REORDERING] = dst_metric_raw(dst, RTAX_REORDERING);
        tm->tcpm_ts = 0;
        tm->tcpm_ts_stamp = 0;
        tm->tcpm_fastopen.mss = 0;
        tm->tcpm_fastopen.syn_loss = 0;
        tm->tcpm_fastopen.cookie.len = 0;
}

^ permalink raw reply

* Re: BUG: soft lockup - CPU#6 stuck for 22s! [httpd2-event:15597]
From: Cristian Rodríguez @ 2012-08-25 17:45 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, Yuchung Cheng, Neal Cardwell, Florian Schmitz
In-Reply-To: <1345895225.19483.447.camel@edumazet-glaptop>

El 25/08/12 07:47, Eric Dumazet escribió:
> On Sat, 2012-08-25 at 11:14 +0200, Eric Dumazet wrote:
>> From: Eric Dumazet <edumazet@google.com>
>>
>> On Sat, 2012-08-25 at 10:59 +0200, Eric Dumazet wrote:
>>> On Fri, 2012-08-24 at 20:50 -0400, Cristian Rodríguez wrote:
>>>> Hi, the issue I reported with IPV6 few weeks ago seems to be gone, but
>>>> now I am getting the following crash..
>>
>>> Oh, I now see the bug, I'll send a patch asap
>>
>> Please try the following fix.
>>
>> Thanks !

Eric, thanks for your work, I have deployed the fix in one machine and
will keep an eye for any other anomaly.

As it happends around twice a day, it would take a while to determine if
this issue has gone away.

Keep up great work :-)

^ permalink raw reply

* Re: [PATCH v2 06/10] cgroup: Assign subsystem IDs during compile time
From: Daniel Wagner @ 2012-08-25 17:11 UTC (permalink / raw)
  To: Tejun Heo
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, cgroups-u79uwXL29TY76Z2rM5mHXA,
	David S. Miller, Andrew Morton, Eric Dumazet, Gao feng,
	Glauber Costa, Jamal Hadi Salim, John Fastabend,
	Kamezawa Hiroyuki, Li Zefan, Neil Horman
In-Reply-To: <20120824233810.GT21325-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>

On 25.08.2012 01:38, Tejun Heo wrote:
> Hello,
>
> On Fri, Aug 24, 2012 at 04:01:40PM +0200, Daniel Wagner wrote:
>> We are able to safe some space when we assign the subsystem
>                   ^               ^
> 		 save    if we assign both builtin and
> 		         module susbsystem IDs at compile time?
>
>> IDs at compile time. Instead of allocating per cgroup
>> cgroup->subsys[CGROUP_SUBSYS_COUNT] where CGROUP_SUBSYS_COUNT is
>> always 64, we allocate at max 12 (at this point there are 12
>> subsystem).
>
> Please note (in big fat ugly way) that this disallows support for
> modular controller which isn't known at kernel compile time.

yep, will do

>> task_cls_classid() and task_netprioidx() (when built as
>> module) are protected by a jump label and therefore we can
>> simply replace the subsystem index lookup with the enum.
>
> Can we put these in a separate patch?  ie. The first patch makes all
> subsys IDs constant and then patches to simplify users.

Wouldn't this break bisection? I merged this step so that all steps in 
this series are able to compile and run.

>> diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
>> index 3787872..ada517f 100644
>> --- a/include/linux/cgroup.h
>> +++ b/include/linux/cgroup.h
>> @@ -43,18 +43,27 @@ extern void cgroup_unload_subsys(struct cgroup_subsys *ss);
>>
>>   extern const struct file_operations proc_cgroup_operations;
>>
>> -/* Define the enumeration of all builtin cgroup subsystems */
>> -#define SUBSYS(_x) _x ## _subsys_id,
>> +/*
>> + * Define the enumeration of all builtin cgroup subsystems.
>> + * For the builtin subsystems the subsys_id needs to be indentical
>> + * with the index in css->subsys. Therefore, all the builtin
>> + * subsys are listed first and then the modules ids.
>> + */
>>   enum cgroup_subsys_id {
>> +#define SUBSYS(_x) _x ## _subsys_id,
>> +
>> +#define IS_SUBSYS_ENABLED(option) IS_BUILTIN(option)
>>   #include <linux/cgroup_subsys.h>
>> -};
>> +#undef IS_SUBSYS_ENABLED
>> +
>> +#define IS_SUBSYS_ENABLED(option) IS_MODULE(option)
>> +#include <linux/cgroup_subsys.h>
>> +#undef IS_SUBSYS_ENABLED
>> +
>
> Why do we need to segregate in-kernel and modular ones at all?  What's
> wrong with just defining them in one go?

I have done that but the result was a panic. There seems some code which 
expects this ordering. Let me dig into this and fix it.

>> diff --git a/include/net/cls_cgroup.h b/include/net/cls_cgroup.h
>> index 24443d2..43fae13 100644
>> --- a/include/net/cls_cgroup.h
>> +++ b/include/net/cls_cgroup.h
>> @@ -49,22 +49,16 @@ static inline u32 task_cls_classid(struct task_struct *p)
>>   extern struct static_key cgroup_cls_enabled;
>>   #define clscg_enabled static_key_false(&cgroup_cls_enabled)
>>
>> -extern int net_cls_subsys_id;
>> -
>>   static inline u32 task_cls_classid(struct task_struct *p)
>>   {
>> -	int id;
>> -	u32 classid = 0;
>> +	u32 classid;
>>
>>   	if (!clscg_enabled || in_interrupt())
>>   		return 0;
>>
>>   	rcu_read_lock();
>> -	id = rcu_dereference_index_check(net_cls_subsys_id,
>> -					 rcu_read_lock_held());
>> -	if (id >= 0)
>> -		classid = container_of(task_subsys_state(p, id),
>> -				       struct cgroup_cls_state, css)->classid;
>> +	classid = container_of(task_subsys_state(p, net_cls_subsys_id),
>> +			       struct cgroup_cls_state, css)->classid;
>>   	rcu_read_unlock();
>>
>>   	return classid;
>
> Hmm... patch sequence looks odd to me.  If you first make all IDs
> constant, you can first remove module specific ones and then later add
> jump labels as separate patches.  Wouldn't that be simpler?

As said above, I tried to keep all steps usable so bisection would work. 
I think your steps would lead to non working versions of the kernel.

^ permalink raw reply

* Re: [PATCH v2 05/10] cgroup: Remove CGROUP_BUILTIN_SUBSYS_COUNT
From: Daniel Wagner @ 2012-08-25 16:59 UTC (permalink / raw)
  To: Tejun Heo
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, cgroups-u79uwXL29TY76Z2rM5mHXA,
	Li Zefan, David S. Miller
In-Reply-To: <20120824232840.GS21325-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>

On 25.08.2012 01:28, Tejun Heo wrote:
> On Fri, Aug 24, 2012 at 04:01:39PM +0200, Daniel Wagner wrote:
>> From: Daniel Wagner <daniel.wagner-98C5kh4wR6ohFhg+JK9F0w@public.gmane.org>
>>
>> CGROUP_BUILTIN_SUBSYS_COUNT is used as start or stop point
>> when looping over the subsys array. Since the subsys array is
>> 64 entries long this is a good thing to do. Though we'd like
>> to reduce the array size considerable but we need to get rid
>> of CGROUP_BUILTIN_SUBSYS_COUNT to ease up the review process.
>
> Wouldn't it be better to explicitly state that a following patch would
> reduce the SUBSYS_COUNT and stop putting builtin and module ones into
> different sections?

Sure, can do that. I just to make sure I understand you correctly,
What do you mean with different section? Do you refer to the enum sorting?

^ permalink raw reply

* Re: [PATCH v2 03/10] cgroup: net_cls: Protect access to task_cls_classid() when built as module
From: Daniel Wagner @ 2012-08-25 16:56 UTC (permalink / raw)
  To: Tejun Heo
  Cc: netdev, cgroups, David S. Miller, Gao feng, Jamal Hadi Salim,
	John Fastabend, Li Zefan, Neil Horman
In-Reply-To: <20120824232621.GQ21325@google.com>

On 25.08.2012 01:26, Tejun Heo wrote:
> On Fri, Aug 24, 2012 at 04:01:37PM +0200, Daniel Wagner wrote:
>> @@ -306,6 +312,11 @@ static void __exit exit_cgroup_cls(void)
>>   	synchronize_rcu();
>>   #endif
>>
>> +#if IS_MODULE(CONFIG_NET_CLS_CGROUP)
>> +	static_key_slow_dec(&cgroup_cls_enabled);
>> +	rcu_barrier();
>
> Why is this rcu_barrier() necessary?

I have read the rcubarrier.txt document and I got from that that an 
rcu_barrier() is needed when unloading a module. But maybe I got it wrong.

So the idea after disabling the jump lables all pending readers in
task_cls_classid() have left. THe same thing is done in the old code 
with the dynamic id part. With the difference that synchronize_rcu() is 
used.

> In general, please explain what
> synchronization is going on when using sync constructs which aren't
> obvious - e.g. memory barriers, rcu barriers.

Sure, I will keep this in mind.

^ permalink raw reply

* Re: [PATCH v2 00/10] cgroup: Assign subsystem IDs during compile time
From: Daniel Wagner @ 2012-08-25 16:49 UTC (permalink / raw)
  To: Tejun Heo
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, cgroups-u79uwXL29TY76Z2rM5mHXA,
	David S. Miller, Andrew Morton, Eric Dumazet, Gao feng,
	Glauber Costa, Jamal Hadi Salim, John Fastabend,
	Kamezawa Hiroyuki, Li Zefan, Neil Horman
In-Reply-To: <20120824231528.GO21325-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>

Hi Tejun,

On 25.08.2012 01:15, Tejun Heo wrote:
> Hello, Daniel.
>
> On Fri, Aug 24, 2012 at 04:01:34PM +0200, Daniel Wagner wrote:
>> CGROUP_BUILTIN_SUBSYS_COUNT is also gone in this version.  This time I
>> trade space for speed. Some extra cycles are spend to identify the
>> modules in the for loops, e.g.
>
> There's no point in optimizing either space or speed here.  It's not a
> hot path by any stretch of imagination.  Please focus on making it
> simple.

Will do. Thanks a lot for your feedback. I'll update the series accordingly.

cheers,
daniel

^ permalink raw reply

* Re: [PATCH] af_unix: fix unix_nr_socks check in unix_create1()
From: Xi Wang @ 2012-08-25 16:17 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, David S. Miller, Eric Dumazet
In-Reply-To: <1345876989.19483.83.camel@edumazet-glaptop>

On Aug 25, 2012, at 2:43 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:

> I dont think this patch is right.
> 
> atomic_long_inc_return() is expensive, more than atomic_long_inc()
> 
> And setting a 2^63 limit for max number of files is plain wrong,
> as there is no way a kernel can allocate 2^63 files structures.
> 
> (same apply on 32bit arches, but for 2^31)
> 
> If you feel you must warn a sysadmin of stupid settings, add sane
> boundaries in kernel/sysctl.c, and send your patch to lkml instead.

Yeah, I agree it's better to limit max_files in sysctl.  I will send
another patch instead.  Thanks.

- xi

^ permalink raw reply

* [PATCH RFC v2 0/2] Interface for TCP Metrics
From: Julian Anastasov @ 2012-08-25 15:00 UTC (permalink / raw)
  To: netdev

	This patchset contains 2 patches, one for kernel
and one for iproute2. We add DUMP/GET/DEL support for
genl "tcp_metrics" and minimal support for filtering
by address prefix and family in user space.

	I tested show/del/flush, filtering by family, IPv4 prefix,
output for metrics such as rtt, rttvar, cwnd, ssthresh (after
modifying route). I didn't tested output for fast open.

	May be some corrections in output can be desired.

	The kernel patch has some parts to check:

- in tcp_metrics_nl_cmd_del I'm trying to flush all addresses
with single request, eg. when no family, address or other
selectors are provided. I use some arbitrary counter sync_count
to force memory to be freed in parts by using synchronize_rcu,
note that we are under genl_mutex, so may be this is bad idea
to delay other genl users? My idea was to avoid many commands
on "flush all", may be we should trigger flush by using some
other mechanism that is pernet? And I don't know how to test
it properly without large cache.

- I enabled lockdep in config and don't see any warnings.
make C=2 net/ipv4/tcp_metrics.o is silent too.

v2:
- patch 1: remove rcu_assign_pointer, add tcp_metrics_flush_all
- patch 2: properly flush by specifying address, improve man page

^ permalink raw reply

* [PATCH RFC v2 2/2] iproute2: add support for tcp_metrics
From: Julian Anastasov @ 2012-08-25 15:00 UTC (permalink / raw)
  To: netdev
In-Reply-To: <1345906844-25446-1-git-send-email-ja@ssi.bg>

	ip tcp_metrics/tcpmetrics

v2:
- On flush we should provide the address in req2
- "flush all" should use single del, just like when "all" is not provided
- Explain printed information in man page

Signed-off-by: Julian Anastasov <ja@ssi.bg>
---

diff -urpN iproute2-3.5.1/include/linux/tcp_metrics.h iproute2-3.5.1-tcp_metrics/include/linux/tcp_metrics.h
--- iproute2-3.5.1/include/linux/tcp_metrics.h	1970-01-01 02:00:00.000000000 +0200
+++ iproute2-3.5.1-tcp_metrics/include/linux/tcp_metrics.h	2012-08-23 09:50:54.385569009 +0300
@@ -0,0 +1,54 @@
+/* tcp_metrics.h - TCP Metrics Interface */
+
+#ifndef _LINUX_TCP_METRICS_H
+#define _LINUX_TCP_METRICS_H
+
+#include <linux/types.h>
+
+/* NETLINK_GENERIC related info
+ */
+#define TCP_METRICS_GENL_NAME		"tcp_metrics"
+#define TCP_METRICS_GENL_VERSION	0x1
+
+enum tcp_metric_index {
+	TCP_METRIC_RTT,
+	TCP_METRIC_RTTVAR,
+	TCP_METRIC_SSTHRESH,
+	TCP_METRIC_CWND,
+	TCP_METRIC_REORDERING,
+
+	/* Always last.  */
+	__TCP_METRIC_MAX,
+};
+
+#define TCP_METRIC_MAX	(__TCP_METRIC_MAX - 1)
+
+enum {
+	TCP_METRICS_ATTR_UNSPEC,
+	TCP_METRICS_ATTR_ADDR_IPV4,		/* u32 */
+	TCP_METRICS_ATTR_ADDR_IPV6,		/* binary */
+	TCP_METRICS_ATTR_AGE,			/* msecs */
+	TCP_METRICS_ATTR_TW_TSVAL,		/* u32, raw, rcv tsval */
+	TCP_METRICS_ATTR_TW_TS_STAMP,		/* s32, sec age */
+	TCP_METRICS_ATTR_VALS,			/* nested +1, u32 */
+	TCP_METRICS_ATTR_FOPEN_MSS,		/* u16 */
+	TCP_METRICS_ATTR_FOPEN_SYN_DROPS,	/* u16, count of drops */
+	TCP_METRICS_ATTR_FOPEN_SYN_DROP_TS,	/* msecs age */
+	TCP_METRICS_ATTR_FOPEN_COOKIE,		/* binary */
+
+	__TCP_METRICS_ATTR_MAX,
+};
+
+#define TCP_METRICS_ATTR_MAX	(__TCP_METRICS_ATTR_MAX - 1)
+
+enum {
+	TCP_METRICS_CMD_UNSPEC,
+	TCP_METRICS_CMD_GET,
+	TCP_METRICS_CMD_DEL,
+
+	__TCP_METRICS_CMD_MAX,
+};
+
+#define TCP_METRICS_CMD_MAX	(__TCP_METRICS_CMD_MAX - 1)
+
+#endif /* _LINUX_TCP_METRICS_H */
diff -urpN iproute2-3.5.1/ip/Makefile iproute2-3.5.1-tcp_metrics/ip/Makefile
--- iproute2-3.5.1/ip/Makefile	2012-08-13 18:13:58.000000000 +0300
+++ iproute2-3.5.1-tcp_metrics/ip/Makefile	2012-08-23 10:24:01.561660891 +0300
@@ -3,7 +3,7 @@ IPOBJ=ip.o ipaddress.o ipaddrlabel.o ipr
     ipmaddr.o ipmonitor.o ipmroute.o ipprefix.o iptuntap.o \
     ipxfrm.o xfrm_state.o xfrm_policy.o xfrm_monitor.o \
     iplink_vlan.o link_veth.o link_gre.o iplink_can.o \
-    iplink_macvlan.o iplink_macvtap.o ipl2tp.o
+    iplink_macvlan.o iplink_macvtap.o ipl2tp.o tcp_metrics.o
 
 RTMONOBJ=rtmon.o
 
diff -urpN iproute2-3.5.1/ip/ip.c iproute2-3.5.1-tcp_metrics/ip/ip.c
--- iproute2-3.5.1/ip/ip.c	2012-08-13 18:13:58.000000000 +0300
+++ iproute2-3.5.1-tcp_metrics/ip/ip.c	2012-08-23 10:21:20.917653464 +0300
@@ -45,7 +45,7 @@ static void usage(void)
 "       ip [ -force ] -batch filename\n"
 "where  OBJECT := { link | addr | addrlabel | route | rule | neigh | ntable |\n"
 "                   tunnel | tuntap | maddr | mroute | mrule | monitor | xfrm |\n"
-"                   netns | l2tp }\n"
+"                   netns | l2tp | tcp_metrics }\n"
 "       OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n"
 "                    -f[amily] { inet | inet6 | ipx | dnet | link } |\n"
 "                    -l[oops] { maximum-addr-flush-attempts } |\n"
@@ -78,6 +78,8 @@ static const struct cmd {
 	{ "tunl",	do_iptunnel },
 	{ "tuntap",	do_iptuntap },
 	{ "tap",	do_iptuntap },
+	{ "tcpmetrics",	do_tcp_metrics },
+	{ "tcp_metrics",do_tcp_metrics },
 	{ "monitor",	do_ipmonitor },
 	{ "xfrm",	do_xfrm },
 	{ "mroute",	do_multiroute },
diff -urpN iproute2-3.5.1/ip/ip_common.h iproute2-3.5.1-tcp_metrics/ip/ip_common.h
--- iproute2-3.5.1/ip/ip_common.h	2012-08-13 18:13:58.000000000 +0300
+++ iproute2-3.5.1-tcp_metrics/ip/ip_common.h	2012-08-23 10:19:11.005647457 +0300
@@ -42,6 +42,7 @@ extern int do_multirule(int argc, char *
 extern int do_netns(int argc, char **argv);
 extern int do_xfrm(int argc, char **argv);
 extern int do_ipl2tp(int argc, char **argv);
+extern int do_tcp_metrics(int argc, char **argv);
 
 static inline int rtm_get_table(struct rtmsg *r, struct rtattr **tb)
 {
diff -urpN iproute2-3.5.1/ip/tcp_metrics.c iproute2-3.5.1-tcp_metrics/ip/tcp_metrics.c
--- iproute2-3.5.1/ip/tcp_metrics.c	1970-01-01 02:00:00.000000000 +0200
+++ iproute2-3.5.1-tcp_metrics/ip/tcp_metrics.c	2012-08-25 15:18:31.695944914 +0300
@@ -0,0 +1,504 @@
+/*
+ * tcp_metrics.c	"ip tcp_metrics/tcpmetrics"
+ *
+ *		This program is free software; you can redistribute it and/or
+ *		modify it under the terms of the GNU General Public License
+ *		version 2 as published by the Free Software Foundation;
+ *
+ * Authors:	Julian Anastasov <ja@ssi.bg>, August 2012
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#include <sys/ioctl.h>
+#include <linux/if.h>
+
+#include <linux/genetlink.h>
+#include <linux/tcp_metrics.h>
+
+#include "utils.h"
+#include "ip_common.h"
+
+static void usage(void)
+{
+	fprintf(stderr, "Usage: ip tcp_metrics/tcpmetrics { COMMAND | help }\n");
+	fprintf(stderr, "       ip tcp_metrics { show | flush } SELECTOR\n");
+	fprintf(stderr, "       ip tcp_metrics delete [ address ] ADDRESS\n");
+	fprintf(stderr, "SELECTOR := [ [ address ] PREFIX ]\n");
+	exit(-1);
+}
+
+/* netlink socket */
+static struct rtnl_handle grth = { .fd = -1 };
+static int genl_family = -1;
+
+
+#define GENL_DEFINE_REQUEST(req, hdrsize, bufsiz)			\
+struct {								\
+	struct nlmsghdr		n;					\
+	struct genlmsghdr	g;					\
+	char			buf[NLMSG_ALIGN(hdrsize) + bufsiz];	\
+} req
+
+#define GENL_INIT_REQUEST(req, family, hdrsize, ver, cmd_, flags)	\
+	do {								\
+		memset(&req, 0, sizeof(req));				\
+		req.n.nlmsg_type = family;				\
+		req.n.nlmsg_flags = flags;				\
+		req.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN + hdrsize);	\
+		req.g.cmd = cmd_;					\
+		req.g.version = ver;					\
+	} while (0)
+
+#define INIT_GENL_ACTION(req, cmd, ack)					\
+	GENL_INIT_REQUEST(req, genl_family, 0,				\
+			  TCP_METRICS_GENL_VERSION, cmd,		\
+			  NLM_F_REQUEST | ((ack) ? NLM_F_ACK : 0))
+
+#define INIT_GENL_DUMP(req)						\
+	GENL_INIT_REQUEST(req, genl_family, 0,				\
+			  TCP_METRICS_GENL_VERSION,			\
+			  TCP_METRICS_CMD_GET,				\
+			  NLM_F_DUMP | NLM_F_REQUEST)
+
+#define CMD_LIST	0x0001	/* list, lst, show		*/
+#define CMD_DEL		0x0002	/* delete, remove		*/
+#define CMD_FLUSH	0x0004	/* flush			*/
+
+static struct {
+	char	*name;
+	int	code;
+} cmds[] = {
+	{	"list",		CMD_LIST	},
+	{	"lst",		CMD_LIST	},
+	{	"show",		CMD_LIST	},
+	{	"delete",	CMD_DEL		},
+	{	"remove",	CMD_DEL		},
+	{	"flush",	CMD_FLUSH	},
+};
+
+static char *metric_name[TCP_METRIC_MAX + 1] = {
+	[TCP_METRIC_RTT]		= "rtt",
+	[TCP_METRIC_RTTVAR]		= "rttvar",
+	[TCP_METRIC_SSTHRESH]		= "ssthresh",
+	[TCP_METRIC_CWND]		= "cwnd",
+	[TCP_METRIC_REORDERING]		= "reordering",
+};
+
+static struct
+{
+	int flushed;
+	char *flushb;
+	int flushp;
+	int flushe;
+	int cmd;
+	inet_prefix addr;
+} f;
+
+static int flush_update(void)
+{
+	if (rtnl_send_check(&grth, f.flushb, f.flushp) < 0) {
+		perror("Failed to send flush request\n");
+		return -1;
+	}
+	f.flushp = 0;
+	return 0;
+}
+
+static int process_msg(const struct sockaddr_nl *who, struct nlmsghdr *n,
+		       void *arg)
+{
+	FILE *fp = (FILE *) arg;
+	struct genlmsghdr *ghdr;
+	struct rtattr *attrs[TCP_METRICS_ATTR_MAX + 1], *a;
+	int len = n->nlmsg_len;
+	char abuf[256];
+	inet_prefix addr;
+	int family, i, atype;
+
+	if (n->nlmsg_type != genl_family)
+		return -1;
+
+	len -= NLMSG_LENGTH(GENL_HDRLEN);
+	if (len < 0)
+		return -1;
+
+	ghdr = NLMSG_DATA(n);
+	if (ghdr->cmd != TCP_METRICS_CMD_GET)
+		return 0;
+
+	parse_rtattr(attrs, TCP_METRICS_ATTR_MAX, (void *) ghdr + GENL_HDRLEN,
+		     len);
+
+	a = attrs[TCP_METRICS_ATTR_ADDR_IPV4];
+	if (a) {
+		if (f.addr.family && f.addr.family != AF_INET)
+			return 0;
+		memcpy(&addr.data, RTA_DATA(a), 4);
+		addr.bytelen = 4;
+		family = AF_INET;
+		atype = TCP_METRICS_ATTR_ADDR_IPV4;
+	} else {
+		a = attrs[TCP_METRICS_ATTR_ADDR_IPV6];
+		if (a) {
+			if (f.addr.family && f.addr.family != AF_INET6)
+				return 0;
+			memcpy(&addr.data, RTA_DATA(a), 16);
+			addr.bytelen = 16;
+			family = AF_INET6;
+			atype = TCP_METRICS_ATTR_ADDR_IPV6;
+		} else
+			return 0;
+	}
+
+	if (f.addr.family && f.addr.bitlen >= 0 &&
+	    inet_addr_match(&addr, &f.addr, f.addr.bitlen))
+		return 0;
+
+	if (f.flushb) {
+		struct nlmsghdr *fn;
+		GENL_DEFINE_REQUEST(req2, 0, 128);
+
+		INIT_GENL_ACTION(req2, TCP_METRICS_CMD_DEL, 0);
+		addattr_l(&req2.n, sizeof(req2), atype, &addr.data,
+			  addr.bytelen);
+
+		if (NLMSG_ALIGN(f.flushp) + req2.n.nlmsg_len > f.flushe) {
+			if (flush_update())
+				return -1;
+		}
+		fn = (struct nlmsghdr *) (f.flushb + NLMSG_ALIGN(f.flushp));
+		memcpy(fn, &req2.n, req2.n.nlmsg_len);
+		fn->nlmsg_seq = ++grth.seq;
+		f.flushp = (((char *) fn) + req2.n.nlmsg_len) - f.flushb;
+		f.flushed++;
+		if (show_stats < 2)
+			return 0;
+	}
+
+	if (f.cmd & (CMD_DEL | CMD_FLUSH))
+		fprintf(fp, "Deleted ");
+
+	fprintf(fp, "%s",
+		format_host(family, RTA_PAYLOAD(a), &addr.data,
+			    abuf, sizeof(abuf)));
+
+	a = attrs[TCP_METRICS_ATTR_AGE];
+	if (a) {
+		__u64 val = rta_getattr_u64(a);
+
+		fprintf(fp, " age %llu.%03llusec",
+			val / 1000, val % 1000);
+	}
+
+	a = attrs[TCP_METRICS_ATTR_TW_TS_STAMP];
+	if (a) {
+		__s32 val = (__s32) rta_getattr_u32(a);
+		__u32 tsval;
+
+		a = attrs[TCP_METRICS_ATTR_TW_TSVAL];
+		tsval = a ? rta_getattr_u32(a) : 0;
+		fprintf(fp, " tw_ts %u/%dsec ago", tsval, val);
+	}
+
+	a = attrs[TCP_METRICS_ATTR_VALS];
+	if (a) {
+		struct rtattr *m[TCP_METRIC_MAX + 1 + 1];
+
+		parse_rtattr_nested(m, TCP_METRIC_MAX + 1, a);
+
+		for (i = 0; i < TCP_METRIC_MAX + 1; i++) {
+			__u32 val;
+
+			a = m[i + 1];
+			if (!a)
+				continue;
+			if (metric_name[i])
+				fprintf(fp, " %s ", metric_name[i]);
+			else
+				fprintf(fp, " metric_%d ", i);
+			val = rta_getattr_u32(a);
+			switch (i) {
+			case TCP_METRIC_RTT:
+			case TCP_METRIC_RTTVAR:
+				fprintf(fp, "%ums", val);
+				break;
+			case TCP_METRIC_SSTHRESH:
+			case TCP_METRIC_CWND:
+			case TCP_METRIC_REORDERING:
+			default:
+				fprintf(fp, "%u", val);
+				break;
+			}
+		}
+	}
+
+	a = attrs[TCP_METRICS_ATTR_FOPEN_MSS];
+	if (a)
+		fprintf(fp, " fo_mss %u", rta_getattr_u16(a));
+
+	a = attrs[TCP_METRICS_ATTR_FOPEN_SYN_DROPS];
+	if (a) {
+		__u16 syn_loss = rta_getattr_u16(a);
+		__u64 ts;
+
+		a = attrs[TCP_METRICS_ATTR_FOPEN_SYN_DROP_TS];
+		ts = a ? rta_getattr_u64(a) : 0;
+
+		fprintf(fp, " fo_syn_drops %u/%llu.%03llusec ago",
+			syn_loss, ts / 1000, ts % 1000);
+	}
+
+	a = attrs[TCP_METRICS_ATTR_FOPEN_COOKIE];
+	if (a) {
+		char cookie[32 + 1];
+		unsigned char *ptr = RTA_DATA(a);
+		int i, max = RTA_PAYLOAD(a);
+
+		if (max > 16)
+			max = 16;
+		cookie[0] = 0;
+		for (i = 0; i < max; i++)
+			sprintf(cookie + i + i, "%02x", ptr[i]);
+		fprintf(fp, " fo_cookie %s", cookie);
+	}
+
+	fprintf(fp, "\n");
+
+	fflush(fp);
+	return 0;
+}
+
+static int genl_parse_getfamily(struct nlmsghdr *nlh)
+{
+	struct rtattr *tb[CTRL_ATTR_MAX + 1];
+	struct genlmsghdr *ghdr = NLMSG_DATA(nlh);
+	int len = nlh->nlmsg_len;
+	struct rtattr *attrs;
+
+	if (nlh->nlmsg_type != GENL_ID_CTRL) {
+		fprintf(stderr, "Not a controller message, nlmsg_len=%d "
+			"nlmsg_type=0x%x\n", nlh->nlmsg_len, nlh->nlmsg_type);
+		return -1;
+	}
+
+	if (ghdr->cmd != CTRL_CMD_NEWFAMILY) {
+		fprintf(stderr, "Unknown controller command %d\n", ghdr->cmd);
+		return -1;
+	}
+
+	len -= NLMSG_LENGTH(GENL_HDRLEN);
+
+	if (len < 0) {
+		fprintf(stderr, "wrong controller message len %d\n", len);
+		return -1;
+	}
+
+	attrs = (struct rtattr *) ((char *) ghdr + GENL_HDRLEN);
+	parse_rtattr(tb, CTRL_ATTR_MAX, attrs, len);
+
+	if (tb[CTRL_ATTR_FAMILY_ID] == NULL) {
+		fprintf(stderr, "Missing family id TLV\n");
+		return -1;
+	}
+
+	return rta_getattr_u16(tb[CTRL_ATTR_FAMILY_ID]);
+}
+
+static int genl_ctrl_resolve_family(const char *family)
+{
+	GENL_DEFINE_REQUEST(req, 0, 1024);
+
+	GENL_INIT_REQUEST(req, GENL_ID_CTRL, 0, 0, CTRL_CMD_GETFAMILY,
+			  NLM_F_REQUEST);
+
+	addattr_l(&req.n, 1024, CTRL_ATTR_FAMILY_NAME,
+		  family, strlen(family) + 1);
+
+	if (rtnl_talk(&grth, &req.n, 0, 0, &req.n) < 0) {
+		fprintf(stderr, "Error talking to the kernel\n");
+		return -2;
+	}
+
+	return genl_parse_getfamily(&req.n);
+}
+
+static int tcpm_do_cmd(int cmd, int argc, char **argv)
+{
+	GENL_DEFINE_REQUEST(req, 0, 1024);
+	int atype = -1;
+	int code, ack;
+
+	memset(&f, 0, sizeof(f));
+	f.addr.bitlen = -1;
+	f.addr.family = preferred_family;
+
+	switch (preferred_family) {
+	case AF_UNSPEC:
+	case AF_INET:
+	case AF_INET6:
+		break;
+	default:
+		fprintf(stderr, "Unsupported family:%d\n", preferred_family);
+		return -1;
+	}
+
+	for (; argc > 0; argc--, argv++) {
+		char *who = "address";
+
+		if (strcmp(*argv, "addr") == 0 ||
+		    strcmp(*argv, "address") == 0) {
+			who = *argv;
+			NEXT_ARG();
+		}
+		if (matches(*argv, "help") == 0)
+			usage();
+		if (f.addr.bitlen >= 0)
+			duparg2(who, *argv);
+
+		get_prefix(&f.addr, *argv, preferred_family);
+		if (f.addr.bytelen && f.addr.bytelen * 8 == f.addr.bitlen) {
+			if (f.addr.family == AF_INET)
+				atype = TCP_METRICS_ATTR_ADDR_IPV4;
+			else if (f.addr.family == AF_INET6)
+				atype = TCP_METRICS_ATTR_ADDR_IPV6;
+		}
+		if ((CMD_DEL & cmd) && atype < 0) {
+			fprintf(stderr, "Error: a specific IP address is expected rather than \"%s\"\n",
+				*argv);
+			return -1;
+		}
+
+		argc--; argv++;
+	}
+
+	if (cmd == CMD_DEL && atype < 0)
+		missarg("address");
+
+	/* flush for exact address ? Single del */
+	if (cmd == CMD_FLUSH && atype >= 0)
+		cmd = CMD_DEL;
+	/* flush for all addresses ? Single del without address */
+	if (cmd == CMD_FLUSH && f.addr.bitlen <= 0 &&
+	    preferred_family == AF_UNSPEC) {
+		cmd = CMD_DEL;
+		code = TCP_METRICS_CMD_DEL;
+		ack = 1;
+	} else if (cmd == CMD_DEL) {
+		code = TCP_METRICS_CMD_DEL;
+		ack = 1;
+	} else {	/* CMD_FLUSH, CMD_LIST */
+		code = TCP_METRICS_CMD_GET;
+		ack = 0;
+	}
+
+	if (genl_family < 0) {
+		if (rtnl_open_byproto(&grth, 0, NETLINK_GENERIC) < 0) {
+			fprintf(stderr, "Cannot open generic netlink socket\n");
+			exit(1);
+		}
+		genl_family = genl_ctrl_resolve_family(TCP_METRICS_GENL_NAME);
+		if (genl_family < 0)
+			exit(1);
+	}
+
+	if (!(cmd & CMD_FLUSH) && (atype >= 0 || (cmd & CMD_DEL))) {
+		INIT_GENL_ACTION(req, code, ack);
+		if (atype >= 0)
+			addattr_l(&req.n, sizeof(req), atype, &f.addr.data,
+				  f.addr.bytelen);
+	} else {
+		INIT_GENL_DUMP(req);
+	}
+
+	f.cmd = cmd;
+	if (cmd & CMD_FLUSH) {
+		int round = 0;
+		char flushb[4096-512];
+
+		f.flushb = flushb;
+		f.flushp = 0;
+		f.flushe = sizeof(flushb);
+
+		for (;;) {
+			req.n.nlmsg_seq = grth.dump = ++grth.seq;
+			if (rtnl_send(&grth, &req, req.n.nlmsg_len) < 0) {
+				perror("Failed to send flush request");
+				exit(1);
+			}
+			f.flushed = 0;
+			if (rtnl_dump_filter(&grth, process_msg, stdout) < 0) {
+				fprintf(stderr, "Flush terminated\n");
+				exit(1);
+			}
+			if (f.flushed == 0) {
+				if (round == 0) {
+					fprintf(stderr, "Nothing to flush.\n");
+				} else if (show_stats)
+					printf("*** Flush is complete after %d round%s ***\n",
+					       round, round > 1 ? "s" : "");
+				fflush(stdout);
+				return 0;
+			}
+			round++;
+			if (flush_update() < 0)
+				exit(1);
+			if (show_stats) {
+				printf("\n*** Round %d, deleting %d entries ***\n",
+				       round, f.flushed);
+				fflush(stdout);
+			}
+		}
+		return 0;
+	}
+
+	req.n.nlmsg_seq = ++grth.seq;
+	if (ack) {
+		if (rtnl_talk(&grth, &req.n, 0, 0, NULL) < 0)
+			return -2;
+	} else if (atype >= 0) {
+		if (rtnl_talk(&grth, &req.n, 0, 0, &req.n) < 0)
+			return -2;
+		if (process_msg(NULL, &req.n, stdout) < 0) {
+			fprintf(stderr, "Dump terminated\n");
+			exit(1);
+		}
+	} else {
+		grth.dump = grth.seq;
+		if (rtnl_send(&grth, &req, req.n.nlmsg_len) < 0) {
+			perror("Failed to send dump request");
+			exit(1);
+		}
+
+		if (rtnl_dump_filter(&grth, process_msg, stdout) < 0) {
+			fprintf(stderr, "Dump terminated\n");
+			exit(1);
+		}
+	}
+	return 0;
+}
+
+int do_tcp_metrics(int argc, char **argv)
+{
+	int i;
+
+	if (argc < 1)
+		return tcpm_do_cmd(CMD_LIST, 0, NULL);
+	for (i = 0; i < ARRAY_SIZE(cmds); i++) {
+		if (matches(argv[0], cmds[i].name) == 0)
+			return tcpm_do_cmd(cmds[i].code, argc-1, argv+1);
+	}
+	if (matches(argv[0], "help") == 0)
+		usage();
+
+	fprintf(stderr, "Command \"%s\" is unknown, "
+			"try \"ip tcp_metrics help\".\n", *argv);
+	exit(-1);
+}
+
diff -urpN iproute2-3.5.1/man/man8/Makefile iproute2-3.5.1-tcp_metrics/man/man8/Makefile
--- iproute2-3.5.1/man/man8/Makefile	2012-08-13 18:13:58.000000000 +0300
+++ iproute2-3.5.1-tcp_metrics/man/man8/Makefile	2012-08-23 14:45:12.506385476 +0300
@@ -7,7 +7,8 @@ MAN8PAGES = $(TARGETS) ip.8 arpd.8 lnsta
 	bridge.8 rtstat.8 ctstat.8 nstat.8 routef.8 \
 	ip-tunnel.8 ip-rule.8 ip-ntable.8 \
 	ip-monitor.8 tc-stab.8 tc-hfsc.8 ip-xfrm.8 ip-netns.8 \
-	ip-neighbour.8 ip-mroute.8 ip-maddress.8 ip-addrlabel.8 
+	ip-neighbour.8 ip-mroute.8 ip-maddress.8 ip-addrlabel.8 \
+	ip-tcp_metrics.8
 
 
 all: $(TARGETS)
diff -urpN iproute2-3.5.1/man/man8/ip-tcp_metrics.8 iproute2-3.5.1-tcp_metrics/man/man8/ip-tcp_metrics.8
--- iproute2-3.5.1/man/man8/ip-tcp_metrics.8	1970-01-01 02:00:00.000000000 +0200
+++ iproute2-3.5.1-tcp_metrics/man/man8/ip-tcp_metrics.8	2012-08-25 17:37:30.868321617 +0300
@@ -0,0 +1,143 @@
+.TH "IP\-TCP_METRICS" 8 "23 Aug 2012" "iproute2" "Linux"
+.SH "NAME"
+ip-tcp_metrics \- management for TCP Metrics
+.SH "SYNOPSIS"
+.sp
+.ad l
+.in +8
+.ti -8
+.B ip
+.RI "[ " OPTIONS " ]"
+.B tcp_metrics
+.RI "{ " COMMAND " | "
+.BR help " }"
+.sp
+
+.ti -8
+.BR "ip tcp_metrics" " { " show " | " flush " }
+.IR SELECTOR
+
+.ti -8
+.BR "ip tcp_metrics delete " [ " address " ]
+.IR ADDRESS
+
+.ti -8
+.IR SELECTOR " := " 
+.RB "[ [ " address " ] "
+.IR PREFIX " ]"
+
+.SH "DESCRIPTION"
+.B ip tcp_metrics
+is used to manipulate entries in the kernel that keep TCP information
+for IPv4 and IPv6 destinations. The entries are created when
+TCP sockets want to share information for destinations and are
+stored in a cache keyed by the destination address. The saved
+information may include values for metrics (initially obtained from
+routes), recent TSVAL for TIME-WAIT recycling purposes, state for the
+Fast Open feature, etc.
+For performance reasons the cache can not grow above configured limit
+and the older entries are replaced with fresh information, sometimes
+reclaimed and used for new destinations. The kernel never removes
+entries, they can be flushed only with this tool.
+
+.SS ip tcp_metrics show - show cached entries
+
+.TP
+.BI address " PREFIX " (default)
+IPv4/IPv6 prefix or address. If no prefix is provided all entries are shown.
+
+.LP
+The output may contain the following information:
+
+.BI age " <S.MMM>" sec
+- time after the entry was created, reset or updated with metrics
+from sockets. The entry is reset and refreshed on use with metrics from
+route if the metrics are not updated in last hour. Not all cached values
+reset the age on update.
+
+.BI cwnd " <N>"
+- CWND metric value
+
+.BI fo_cookie " <HEX-STRING>"
+- Cookie value received in SYN-ACK to be used by Fast Open for next SYNs
+
+.BI fo_mss " <N>"
+- MSS value received in SYN-ACK to be used by Fast Open for next SYNs
+
+.BI fo_syn_drops " <N>/<S.MMM>" "sec ago"
+- Number of drops of initial outgoing Fast Open SYNs with data
+detected by monitoring the received SYN-ACK after SYN retransmission.
+The seconds show the time after last SYN drop and together with
+the drop count can be used to disable Fast Open for some time.
+
+.BI reordering " <N>"
+- Reordering metric value
+
+.BI rtt " <N>" ms
+- RTT metric value
+
+.BI rttvar " <N>" ms
+- RTTVAR metric value
+
+.BI ssthresh " <SSTHRESH>"
+- SSTHRESH metric value
+
+.BI tw_ts " <TSVAL>/<SEC>" "sec ago"
+- recent TSVAL and the seconds after saving it into TIME-WAIT socket
+
+.SS ip tcp_metrics delete - delete single entry
+
+.TP
+.BI address " ADDRESS " (default)
+IPv4/IPv6 address. The address is a required argument.
+
+.SS ip tcp_metrics flush - flush entries
+This command flushes the entries selected by some criteria.
+
+.PP
+This command has the same arguments as
+.B show.
+
+.SH "EXAMPLES"
+.PP
+ip tcp_metrics show address 192.168.0.0/24
+.RS 4
+Shows the entries for destinations from subnet
+.RE
+.PP
+ip tcp_metrics show 192.168.0.0/24
+.RS 4
+The same but address keyword is optional
+.RE
+.PP
+ip tcp_metrics
+.RS 4
+Show all is the default action
+.RE
+.PP
+ip tcp_metrics delete 192.168.0.1
+.RS 4
+Removes the entry for 192.168.0.1 from cache.
+.RE
+.PP
+ip tcp_metrics flush 192.168.0.0/24
+.RS 4
+Removes entries for destinations from subnet
+.RE
+.PP
+ip tcp_metrics flush all
+.RS 4
+Removes all entries from cache
+.RE
+.PP
+ip -6 tcp_metrics flush all
+.RS 4
+Removes all IPv6 entries from cache keeping the IPv4 entries.
+.RE
+
+.SH SEE ALSO
+.br
+.BR ip (8)
+
+.SH AUTHOR
+Original Manpage by Julian Anastasov <ja@ssi.bg>
diff -urpN iproute2-3.5.1/man/man8/ip.8 iproute2-3.5.1-tcp_metrics/man/man8/ip.8
--- iproute2-3.5.1/man/man8/ip.8	2012-08-13 18:13:58.000000000 +0300
+++ iproute2-3.5.1-tcp_metrics/man/man8/ip.8	2012-08-23 10:28:12.541672495 +0300
@@ -15,7 +15,7 @@ ip \- show / manipulate routing, devices
 .IR OBJECT " := { "
 .BR link " | " addr " | " addrlabel " | " route " | " rule " | " neigh " | "\
  ntable " | " tunnel " | " tuntap " | " maddr " | "  mroute " | " mrule " | "\
- monitor " | " xfrm " | " netns " | "  l2tp " }"
+ monitor " | " xfrm " | " netns " | "  l2tp " | "  tcp_metrics " }"
 .sp
 
 .ti -8
@@ -156,6 +156,10 @@ host addresses.
 - rule in routing policy database.
 
 .TP
+.B tcp_metrics/tcpmetrics
+- manage TCP Metrics
+
+.TP
 .B tunnel
 - tunnel over IP.
 
@@ -215,6 +219,7 @@ was written by Alexey N. Kuznetsov and a
 .BR ip-ntable (8),
 .BR ip-route (8),
 .BR ip-rule (8),
+.BR ip-tcp_metrics (8),
 .BR ip-tunnel (8),
 .BR ip-xfrm (8)
 .br

^ permalink raw reply

* [PATCH RFC v2 1/2] tcp: add generic netlink support for tcp_metrics
From: Julian Anastasov @ 2012-08-25 15:00 UTC (permalink / raw)
  To: netdev
In-Reply-To: <1345906844-25446-1-git-send-email-ja@ssi.bg>

	Add support for genl "tcp_metrics". No locking
is changed, only that now we can unlink and delete
entries after grace period. We implement get/del for
single entry and dump to support show/flush filtering
in user space. Del without address attribute causes
flush for all addresses, sadly under genl_mutex.

v2:
- remove rcu_assign_pointer as suggested by Eric Dumazet,
it is not needed because there are no other writes under lock
- move the flushing code in tcp_metrics_flush_all

Signed-off-by: Julian Anastasov <ja@ssi.bg>
---
 include/linux/Kbuild        |    1 +
 include/linux/tcp_metrics.h |   54 +++++++
 net/ipv4/tcp_metrics.c      |  357 +++++++++++++++++++++++++++++++++++++++++--
 3 files changed, 399 insertions(+), 13 deletions(-)
 create mode 100644 include/linux/tcp_metrics.h

diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 1f2c1c7..90da0af 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -363,6 +363,7 @@ header-y += sysctl.h
 header-y += sysinfo.h
 header-y += taskstats.h
 header-y += tcp.h
+header-y += tcp_metrics.h
 header-y += telephony.h
 header-y += termios.h
 header-y += time.h
diff --git a/include/linux/tcp_metrics.h b/include/linux/tcp_metrics.h
new file mode 100644
index 0000000..cb5157b
--- /dev/null
+++ b/include/linux/tcp_metrics.h
@@ -0,0 +1,54 @@
+/* tcp_metrics.h - TCP Metrics Interface */
+
+#ifndef _LINUX_TCP_METRICS_H
+#define _LINUX_TCP_METRICS_H
+
+#include <linux/types.h>
+
+/* NETLINK_GENERIC related info
+ */
+#define TCP_METRICS_GENL_NAME		"tcp_metrics"
+#define TCP_METRICS_GENL_VERSION	0x1
+
+enum tcp_metric_index {
+	TCP_METRIC_RTT,
+	TCP_METRIC_RTTVAR,
+	TCP_METRIC_SSTHRESH,
+	TCP_METRIC_CWND,
+	TCP_METRIC_REORDERING,
+
+	/* Always last.  */
+	__TCP_METRIC_MAX,
+};
+
+#define TCP_METRIC_MAX	(__TCP_METRIC_MAX - 1)
+
+enum {
+	TCP_METRICS_ATTR_UNSPEC,
+	TCP_METRICS_ATTR_ADDR_IPV4,		/* u32 */
+	TCP_METRICS_ATTR_ADDR_IPV6,		/* binary */
+	TCP_METRICS_ATTR_AGE,			/* msecs */
+	TCP_METRICS_ATTR_TW_TSVAL,		/* u32, raw, rcv tsval */
+	TCP_METRICS_ATTR_TW_TS_STAMP,		/* s32, sec age */
+	TCP_METRICS_ATTR_VALS,			/* nested +1, u32 */
+	TCP_METRICS_ATTR_FOPEN_MSS,		/* u16 */
+	TCP_METRICS_ATTR_FOPEN_SYN_DROPS,	/* u16, count of drops */
+	TCP_METRICS_ATTR_FOPEN_SYN_DROP_TS,	/* msecs age */
+	TCP_METRICS_ATTR_FOPEN_COOKIE,		/* binary */
+
+	__TCP_METRICS_ATTR_MAX,
+};
+
+#define TCP_METRICS_ATTR_MAX	(__TCP_METRICS_ATTR_MAX - 1)
+
+enum {
+	TCP_METRICS_CMD_UNSPEC,
+	TCP_METRICS_CMD_GET,
+	TCP_METRICS_CMD_DEL,
+
+	__TCP_METRICS_CMD_MAX,
+};
+
+#define TCP_METRICS_CMD_MAX	(__TCP_METRICS_CMD_MAX - 1)
+
+#endif /* _LINUX_TCP_METRICS_H */
diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c
index 0abe67b..b020135 100644
--- a/net/ipv4/tcp_metrics.c
+++ b/net/ipv4/tcp_metrics.c
@@ -8,6 +8,7 @@
 #include <linux/init.h>
 #include <linux/tcp.h>
 #include <linux/hash.h>
+#include <linux/tcp_metrics.h>
 
 #include <net/inet_connection_sock.h>
 #include <net/net_namespace.h>
@@ -17,20 +18,10 @@
 #include <net/ipv6.h>
 #include <net/dst.h>
 #include <net/tcp.h>
+#include <net/genetlink.h>
 
 int sysctl_tcp_nometrics_save __read_mostly;
 
-enum tcp_metric_index {
-	TCP_METRIC_RTT,
-	TCP_METRIC_RTTVAR,
-	TCP_METRIC_SSTHRESH,
-	TCP_METRIC_CWND,
-	TCP_METRIC_REORDERING,
-
-	/* Always last.  */
-	TCP_METRIC_MAX,
-};
-
 struct tcp_fastopen_metrics {
 	u16	mss;
 	u16	syn_loss:10;		/* Recurring Fast Open SYN losses */
@@ -45,8 +36,10 @@ struct tcp_metrics_block {
 	u32				tcpm_ts;
 	u32				tcpm_ts_stamp;
 	u32				tcpm_lock;
-	u32				tcpm_vals[TCP_METRIC_MAX];
+	u32				tcpm_vals[TCP_METRIC_MAX + 1];
 	struct tcp_fastopen_metrics	tcpm_fastopen;
+
+	struct rcu_head			rcu_head;
 };
 
 static bool tcp_metric_locked(struct tcp_metrics_block *tm,
@@ -690,6 +683,328 @@ void tcp_fastopen_cache_set(struct sock *sk, u16 mss,
 	rcu_read_unlock();
 }
 
+static struct genl_family tcp_metrics_nl_family = {
+	.id		= GENL_ID_GENERATE,
+	.hdrsize	= 0,
+	.name		= TCP_METRICS_GENL_NAME,
+	.version	= TCP_METRICS_GENL_VERSION,
+	.maxattr	= TCP_METRICS_ATTR_MAX,
+	.netnsok	= true,
+};
+
+static struct nla_policy tcp_metrics_nl_policy[TCP_METRICS_ATTR_MAX + 1] = {
+	[TCP_METRICS_ATTR_ADDR_IPV4]	= { .type = NLA_U32, },
+	[TCP_METRICS_ATTR_ADDR_IPV6]	= { .type = NLA_BINARY,
+					    .len = sizeof(struct in6_addr), },
+	/* Following attributes are not received for GET/DEL,
+	 * we keep them for reference
+	 */
+#if 0
+	[TCP_METRICS_ATTR_AGE]		= { .type = NLA_MSECS, },
+	[TCP_METRICS_ATTR_TW_TSVAL]	= { .type = NLA_U32, },
+	[TCP_METRICS_ATTR_TW_TS_STAMP]	= { .type = NLA_S32, },
+	[TCP_METRICS_ATTR_VALS]		= { .type = NLA_NESTED, },
+	[TCP_METRICS_ATTR_FOPEN_MSS]	= { .type = NLA_U16, },
+	[TCP_METRICS_ATTR_FOPEN_SYN_DROPS]	= { .type = NLA_U16, },
+	[TCP_METRICS_ATTR_FOPEN_SYN_DROP_TS]	= { .type = NLA_MSECS, },
+	[TCP_METRICS_ATTR_FOPEN_COOKIE]	= { .type = NLA_BINARY,
+					    .len = TCP_FASTOPEN_COOKIE_MAX, },
+#endif
+};
+
+/* Add attributes, caller cancels its header on failure */
+static int tcp_metrics_fill_info(struct sk_buff *msg,
+				 struct tcp_metrics_block *tm)
+{
+	struct nlattr *nest;
+	int i;
+
+	switch (tm->tcpm_addr.family) {
+	case AF_INET:
+		if (nla_put_be32(msg, TCP_METRICS_ATTR_ADDR_IPV4,
+				tm->tcpm_addr.addr.a4) < 0)
+			goto nla_put_failure;
+		break;
+	case AF_INET6:
+		if (nla_put(msg, TCP_METRICS_ATTR_ADDR_IPV6, 16,
+			    tm->tcpm_addr.addr.a6) < 0)
+			goto nla_put_failure;
+		break;
+	default:
+		return -EAFNOSUPPORT;
+	}
+
+	if (nla_put_msecs(msg, TCP_METRICS_ATTR_AGE,
+			  jiffies - tm->tcpm_stamp) < 0)
+		goto nla_put_failure;
+	if (tm->tcpm_ts_stamp) {
+		if (nla_put_s32(msg, TCP_METRICS_ATTR_TW_TS_STAMP,
+				(s32) (get_seconds() - tm->tcpm_ts_stamp)) < 0)
+			goto nla_put_failure;
+		if (nla_put_u32(msg, TCP_METRICS_ATTR_TW_TSVAL,
+				tm->tcpm_ts) < 0)
+			goto nla_put_failure;
+	}
+
+	{
+		int n = 0;
+
+		nest = nla_nest_start(msg, TCP_METRICS_ATTR_VALS);
+		if (!nest)
+			goto nla_put_failure;
+		for (i = 0; i < TCP_METRIC_MAX + 1; i++) {
+			if (!tm->tcpm_vals[i])
+				continue;
+			if (nla_put_u32(msg, i + 1, tm->tcpm_vals[i]) < 0)
+				goto nla_put_failure;
+			n++;
+		}
+		if (n)
+			nla_nest_end(msg, nest);
+		else
+			nla_nest_cancel(msg, nest);
+	}
+
+	{
+		struct tcp_fastopen_metrics tfom_copy[1], *tfom;
+		unsigned int seq;
+
+		do {
+			seq = read_seqbegin(&fastopen_seqlock);
+			tfom_copy[0] = tm->tcpm_fastopen;
+		} while (read_seqretry(&fastopen_seqlock, seq));
+
+		tfom = tfom_copy;
+		if (tfom->mss &&
+		    nla_put_u16(msg, TCP_METRICS_ATTR_FOPEN_MSS,
+				tfom->mss) < 0)
+			goto nla_put_failure;
+		if (tfom->syn_loss &&
+		    (nla_put_u16(msg, TCP_METRICS_ATTR_FOPEN_SYN_DROPS,
+				tfom->syn_loss) < 0 ||
+		     nla_put_msecs(msg, TCP_METRICS_ATTR_FOPEN_SYN_DROP_TS,
+				jiffies - tfom->last_syn_loss) < 0))
+			goto nla_put_failure;
+		if (tfom->cookie.len > 0 &&
+		    nla_put(msg, TCP_METRICS_ATTR_FOPEN_COOKIE,
+			    tfom->cookie.len, tfom->cookie.val) < 0)
+			goto nla_put_failure;
+	}
+
+	return 0;
+
+nla_put_failure:
+	return -EMSGSIZE;
+}
+
+static int tcp_metrics_dump_info(struct sk_buff *skb,
+				 struct netlink_callback *cb,
+				 struct tcp_metrics_block *tm)
+{
+	void *hdr;
+
+	hdr = genlmsg_put(skb, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq,
+			  &tcp_metrics_nl_family, NLM_F_MULTI,
+			  TCP_METRICS_CMD_GET);
+	if (!hdr)
+		return -EMSGSIZE;
+
+	if (tcp_metrics_fill_info(skb, tm) < 0)
+		goto nla_put_failure;
+
+	return genlmsg_end(skb, hdr);
+
+nla_put_failure:
+	genlmsg_cancel(skb, hdr);
+	return -EMSGSIZE;
+}
+
+static int tcp_metrics_nl_dump(struct sk_buff *skb,
+			       struct netlink_callback *cb)
+{
+	struct net *net = sock_net(skb->sk);
+	unsigned int max_rows = 1U << net->ipv4.tcp_metrics_hash_log;
+	unsigned int row, s_row = cb->args[0];
+	int s_col = cb->args[1], col = s_col;
+
+	for (row = s_row; row < max_rows; row++, s_col = 0) {
+		struct tcp_metrics_block *tm;
+		struct tcpm_hash_bucket *hb = net->ipv4.tcp_metrics_hash + row;
+
+		rcu_read_lock();
+		for (col = 0, tm = rcu_dereference(hb->chain); tm;
+		     tm = rcu_dereference(tm->tcpm_next), col++) {
+			if (col < s_col)
+				continue;
+			if (tcp_metrics_dump_info(skb, cb, tm) < 0) {
+				rcu_read_unlock();
+				goto done;
+			}
+		}
+		rcu_read_unlock();
+	}
+
+done:
+	cb->args[0] = row;
+	cb->args[1] = col;
+	return skb->len;
+}
+
+static int parse_nl_addr(struct genl_info *info, struct inetpeer_addr *addr,
+			 unsigned int *hash, int optional)
+{
+	struct nlattr *a;
+
+	a = info->attrs[TCP_METRICS_ATTR_ADDR_IPV4];
+	if (a) {
+		addr->family = AF_INET;
+		addr->addr.a4 = nla_get_be32(a);
+		*hash = (__force unsigned int) addr->addr.a4;
+		return 0;
+	}
+	a = info->attrs[TCP_METRICS_ATTR_ADDR_IPV6];
+	if (a) {
+		if (nla_len(a) != sizeof(sizeof(struct in6_addr)))
+			return -EINVAL;
+		addr->family = AF_INET6;
+		memcpy(addr->addr.a6, nla_data(a), sizeof(addr->addr.a6));
+		*hash = ipv6_addr_hash((struct in6_addr *) addr->addr.a6);
+		return 0;
+	}
+	return optional ? 1 : -EAFNOSUPPORT;
+}
+
+static int tcp_metrics_nl_cmd_get(struct sk_buff *skb, struct genl_info *info)
+{
+	struct tcp_metrics_block *tm;
+	struct inetpeer_addr addr;
+	unsigned int hash;
+	struct sk_buff *msg;
+	struct net *net = genl_info_net(info);
+	void *reply;
+	int ret;
+
+	ret = parse_nl_addr(info, &addr, &hash, 0);
+	if (ret < 0)
+		return ret;
+
+	msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
+	if (!msg)
+		return -ENOMEM;
+
+	reply = genlmsg_put_reply(msg, info, &tcp_metrics_nl_family, 0,
+				  info->genlhdr->cmd);
+	if (!reply)
+		goto nla_put_failure;
+
+	hash = hash_32(hash, net->ipv4.tcp_metrics_hash_log);
+	ret = -ESRCH;
+	rcu_read_lock();
+	for (tm = rcu_dereference(net->ipv4.tcp_metrics_hash[hash].chain); tm;
+	     tm = rcu_dereference(tm->tcpm_next)) {
+		if (addr_same(&tm->tcpm_addr, &addr)) {
+			ret = tcp_metrics_fill_info(msg, tm);
+			break;
+		}
+	}
+	rcu_read_unlock();
+	if (ret < 0)
+		goto out_free;
+
+	genlmsg_end(msg, reply);
+	return genlmsg_reply(msg, info);
+
+nla_put_failure:
+	ret = -EMSGSIZE;
+
+out_free:
+	nlmsg_free(msg);
+	return ret;
+}
+
+#define deref_locked_genl(p)	\
+	rcu_dereference_protected(p, lockdep_genl_is_held() && \
+				     lockdep_is_held(&tcp_metrics_lock))
+
+#define deref_genl(p)	rcu_dereference_protected(p, lockdep_genl_is_held())
+
+static int tcp_metrics_flush_all(struct net *net)
+{
+	unsigned int max_rows = 1U << net->ipv4.tcp_metrics_hash_log;
+	struct tcpm_hash_bucket *hb = net->ipv4.tcp_metrics_hash;
+	struct tcp_metrics_block *tm;
+	unsigned int sync_count = 0;
+	unsigned int row;
+
+	for (row = 0; row < max_rows; row++, hb++) {
+		spin_lock_bh(&tcp_metrics_lock);
+		tm = deref_locked_genl(hb->chain);
+		if (tm)
+			hb->chain = NULL;
+		spin_unlock_bh(&tcp_metrics_lock);
+		while (tm) {
+			struct tcp_metrics_block *next;
+
+			next = deref_genl(tm->tcpm_next);
+			kfree_rcu(tm, rcu_head);
+			if (!((++sync_count) & 2047))
+				synchronize_rcu();
+			tm = next;
+		}
+	}
+	return 0;
+}
+
+static int tcp_metrics_nl_cmd_del(struct sk_buff *skb, struct genl_info *info)
+{
+	struct tcpm_hash_bucket *hb;
+	struct tcp_metrics_block *tm;
+	struct tcp_metrics_block __rcu **pp;
+	struct inetpeer_addr addr;
+	unsigned int hash;
+	struct net *net = genl_info_net(info);
+	int ret;
+
+	ret = parse_nl_addr(info, &addr, &hash, 1);
+	if (ret < 0)
+		return ret;
+	if (ret > 0)
+		return tcp_metrics_flush_all(net);
+
+	hash = hash_32(hash, net->ipv4.tcp_metrics_hash_log);
+	hb = net->ipv4.tcp_metrics_hash + hash;
+	pp = &hb->chain;
+	spin_lock_bh(&tcp_metrics_lock);
+	for (tm = deref_locked_genl(*pp); tm;
+	     pp = &tm->tcpm_next, tm = deref_locked_genl(*pp)) {
+		if (addr_same(&tm->tcpm_addr, &addr)) {
+			*pp = tm->tcpm_next;
+			break;
+		}
+	}
+	spin_unlock_bh(&tcp_metrics_lock);
+	if (!tm)
+		return -ESRCH;
+	kfree_rcu(tm, rcu_head);
+	return 0;
+}
+
+static struct genl_ops tcp_metrics_nl_ops[] = {
+	{
+		.cmd = TCP_METRICS_CMD_GET,
+		.doit = tcp_metrics_nl_cmd_get,
+		.dumpit = tcp_metrics_nl_dump,
+		.policy = tcp_metrics_nl_policy,
+		.flags = GENL_ADMIN_PERM,
+	},
+	{
+		.cmd = TCP_METRICS_CMD_DEL,
+		.doit = tcp_metrics_nl_cmd_del,
+		.policy = tcp_metrics_nl_policy,
+		.flags = GENL_ADMIN_PERM,
+	},
+};
+
 static unsigned int tcpmhash_entries;
 static int __init set_tcpmhash_entries(char *str)
 {
@@ -753,5 +1068,21 @@ static __net_initdata struct pernet_operations tcp_net_metrics_ops = {
 
 void __init tcp_metrics_init(void)
 {
-	register_pernet_subsys(&tcp_net_metrics_ops);
+	int ret;
+
+	ret = register_pernet_subsys(&tcp_net_metrics_ops);
+	if (ret < 0)
+		goto cleanup;
+	ret = genl_register_family_with_ops(&tcp_metrics_nl_family,
+					    tcp_metrics_nl_ops,
+					    ARRAY_SIZE(tcp_metrics_nl_ops));
+	if (ret < 0)
+		goto cleanup_subsys;
+	return;
+
+cleanup_subsys:
+	unregister_pernet_subsys(&tcp_net_metrics_ops);
+
+cleanup:
+	return;
 }
-- 
1.7.3.4

^ permalink raw reply related

* Re: BUG: soft lockup - CPU#6 stuck for 22s! [httpd2-event:15597]
From: Eric Dumazet @ 2012-08-25 11:47 UTC (permalink / raw)
  To: Cristian Rodríguez; +Cc: netdev, Yuchung Cheng, Neal Cardwell
In-Reply-To: <1345886085.19483.141.camel@edumazet-glaptop>

On Sat, 2012-08-25 at 11:14 +0200, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
> 
> On Sat, 2012-08-25 at 10:59 +0200, Eric Dumazet wrote:
> > On Fri, 2012-08-24 at 20:50 -0400, Cristian Rodríguez wrote:
> > > Hi, the issue I reported with IPV6 few weeks ago seems to be gone, but
> > > now I am getting the following crash..
> 
> > Oh, I now see the bug, I'll send a patch asap
> 
> Please try the following fix.
> 
> Thanks !

Well, this v2 seems cleaner :

[PATCH v2] tcp: tcp_slow_start() should not decrease snd_cwnd

Cristian Rodríguez reported various lockups in TCP stack,
introduced by commit 9dc274151a548 (tcp: fix ABC in tcp_slow_start())

We could exit tcp_slow_start() with a zeroed snd_cwnd,
and next time we enter tcp_slow_start(), we run an infinite loop.

Reported-by: Cristian Rodríguez <crrodriguez@opensuse.org>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 net/ipv4/tcp_cong.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
index 1432cdb..e656c72 100644
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -337,7 +337,7 @@ void tcp_slow_start(struct tcp_sock *tp)
 		tp->snd_cwnd_cnt -= tp->snd_cwnd;
 		delta++;
 	}
-	tp->snd_cwnd = min(tp->snd_cwnd + delta, tp->snd_cwnd_clamp);
+	tp->snd_cwnd = clamp(tp->snd_cwnd + delta, tp->snd_cwnd, tp->snd_cwnd_clamp);
 }
 EXPORT_SYMBOL_GPL(tcp_slow_start);
 

^ permalink raw reply related

* Re: [Patch] netpoll: revert 6bdb7fe3104 and fix be_poll() instead
From: Sylvain Munaut @ 2012-08-25 10:04 UTC (permalink / raw)
  To: Cong Wang
  Cc: netdev, Andrew Morton, David Miller, Sathya Perla,
	Subbu Seetharaman, Ajit Khaparde
In-Reply-To: <1345880471-29535-1-git-send-email-amwang@redhat.com>

Hi Cong,

On Sat, Aug 25, 2012 at 9:41 AM, Cong Wang <amwang@redhat.com> wrote:
> Against -net.
>
> In the patch "netpoll: re-enable irq in poll_napi()", I tried to
> fix the following warning:
>
> [100718.051041] ------------[ cut here ]------------
> [100718.051048] WARNING: at kernel/softirq.c:159 local_bh_enable_ip+0x7d/0xb0()
> (Not tainted)
> [100718.051049] Hardware name: ProLiant BL460c G7
> ...
> [100718.051068] Call Trace:
> [100718.051073]  [<ffffffff8106b747>] ? warn_slowpath_common+0x87/0xc0
> [100718.051075]  [<ffffffff8106b79a>] ? warn_slowpath_null+0x1a/0x20
> [100718.051077]  [<ffffffff810747ed>] ? local_bh_enable_ip+0x7d/0xb0
> [100718.051080]  [<ffffffff8150041b>] ? _spin_unlock_bh+0x1b/0x20
> [100718.051085]  [<ffffffffa00ee974>] ? be_process_mcc+0x74/0x230 [be2net]
> [100718.051088]  [<ffffffffa00ea68c>] ? be_poll_tx_mcc+0x16c/0x290 [be2net]
> [100718.051090]  [<ffffffff8144fe76>] ? netpoll_poll_dev+0xd6/0x490
> [100718.051095]  [<ffffffffa01d24a5>] ? bond_poll_controller+0x75/0x80 [bonding]
> [100718.051097]  [<ffffffff8144fde5>] ? netpoll_poll_dev+0x45/0x490
> [100718.051100]  [<ffffffff81161b19>] ? ksize+0x19/0x80
> [100718.051102]  [<ffffffff81450437>] ? netpoll_send_skb_on_dev+0x157/0x240
>
> by reenabling IRQ before calling ->poll, but it seems more
> problems are introduced after that patch:
>
> http://ozlabs.org/~akpm/stuff/IMG_20120824_122054.jpg
> http://marc.info/?l=linux-netdev&m=134563282530588&w=2
>
> So it is safe to fix be2net driver code directly.
>
> This patch reverts the offending commit and fixes be_poll() by
> avoid disabling BH there, this is okay because be_poll()
> can be called either by poll_napi() which already disables
> IRQ, or by net_rx_action() which already disables BH.
>
> Reported-by: Andrew Morton <akpm@linux-foundation.org>
> Reported-by: Sylvain Munaut <s.munaut@whatever-company.com>
> Cc: Sylvain Munaut <s.munaut@whatever-company.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: David Miller <davem@davemloft.net>
> Cc: Sathya Perla <sathya.perla@emulex.com>
> Cc: Subbu Seetharaman <subbu.seetharaman@emulex.com>
> Cc: Ajit Khaparde <ajit.khaparde@emulex.com>
> Signed-off-by: Cong Wang <amwang@redhat.com>

Tested-by: Sylvain Munaut <s.munaut@whatever-company.com>


This patch fixes my issues with netconsole, it works fine now !

I tested exact same config with and without and crashes without it,
works fine with it.
The kernel I used was a 3.6-rc3 + PMTU patch + "bnx2 NULL deref with
netpoll" patch.


Thanks a lot.

Cheers,

     Sylvain

^ permalink raw reply

* $
From: Xli @ 2012-08-25  7:06 UTC (permalink / raw)




My name is Sgt. Benny Brooker. I am in the Engineering military unit  
here in Ba'qubah in Iraq; we have some amount of funds that we want to  
move out of the country. REPLY VIA THIS EMAIL: (sgt.benny@w.cn)

-------------------------------------------------------------------------
  Sent via webmail for Chemistry & Biochemistry @ Florida State University
  https://webmail.chem.fsu.edu




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

^ permalink raw reply

* Re: BUG: soft lockup - CPU#6 stuck for 22s! [httpd2-event:15597]
From: Eric Dumazet @ 2012-08-25  9:14 UTC (permalink / raw)
  To: Cristian Rodríguez; +Cc: netdev, Yuchung Cheng, Neal Cardwell
In-Reply-To: <1345885186.19483.109.camel@edumazet-glaptop>

From: Eric Dumazet <edumazet@google.com>

On Sat, 2012-08-25 at 10:59 +0200, Eric Dumazet wrote:
> On Fri, 2012-08-24 at 20:50 -0400, Cristian Rodríguez wrote:
> > Hi, the issue I reported with IPV6 few weeks ago seems to be gone, but
> > now I am getting the following crash..

> Oh, I now see the bug, I'll send a patch asap

Please try the following fix.

Thanks !

[PATCH] tcp: tcp_slow_start() should not decrease snd_cwnd

Cristian Rodríguez reported various lockups in TCP stack,
introduced by commit 9dc274151a548 (tcp: fix ABC in tcp_slow_start())

We could exit tcp_slow_start() with a zeroed snd_cwnd,
and next time we enter tcp_slow_start(), we run an infinite loop.

Reported-by: Cristian Rodríguez <crrodriguez@opensuse.org>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 net/ipv4/tcp_cong.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
index 1432cdb..f20a761 100644
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -309,6 +309,7 @@ void tcp_slow_start(struct tcp_sock *tp)
 {
 	int cnt; /* increase in packets */
 	unsigned int delta = 0;
+	u32 new_snd_cwnd;
 
 	/* RFC3465: ABC Slow start
 	 * Increase only after a full MSS of bytes is acked
@@ -337,7 +338,8 @@ void tcp_slow_start(struct tcp_sock *tp)
 		tp->snd_cwnd_cnt -= tp->snd_cwnd;
 		delta++;
 	}
-	tp->snd_cwnd = min(tp->snd_cwnd + delta, tp->snd_cwnd_clamp);
+	new_snd_cwnd = min(tp->snd_cwnd + delta, tp->snd_cwnd_clamp);
+	tp->snd_cwnd = max(tp->snd_cwnd, new_snd_cwnd);
 }
 EXPORT_SYMBOL_GPL(tcp_slow_start);
 

^ permalink raw reply related

* Re: [PATCH 1/1] tcp: Wrong timeout for SYN segments
From: Eric Dumazet @ 2012-08-25  9:01 UTC (permalink / raw)
  To: Alexander Bergmann; +Cc: David Miller, hkjerry.chu, netdev, linux-kernel
In-Reply-To: <20120825084819.GD430@linlab.net>


> From: Alexander Bergmann <alex@linlab.net>
> Date: Fri, 24 Aug 2012 14:09:49 +0200
> Subject: [PATCH 1/1] tcp: Increase timeout for SYN segments
> 
> Commit 9ad7c049 changed the initRTO from 3secs to 1sec in accordance to
> RFC6298 (former RFC2988bis). This reduced the time till the last SYN
> retransmission packet gets sent from 93secs to 31secs.
> 
> RFC1122 is stating that the retransmission should be done for at least 3
> minutes, but this seems to be quite high.
> 
>   "However, the values of R1 and R2 may be different for SYN
>   and data segments.  In particular, R2 for a SYN segment MUST
>   be set large enough to provide retransmission of the segment
>   for at least 3 minutes.  The application can close the
>   connection (i.e., give up on the open attempt) sooner, of
>   course."
> 
> This patch increases the value of TCP_SYN_RETRIES to the value of 6,
> providing a retransmission window of 63secs.
> 
> The comments for SYN and SYNACK retries have also been updated to
> describe the current settings.
> 
> Signed-off-by: Alexander Bergmann <alex@linlab.net>
> ---

Acked-by: Eric Dumazet <edumazet@google.com>

^ permalink raw reply

* Re: BUG: soft lockup - CPU#6 stuck for 22s! [httpd2-event:15597]
From: Eric Dumazet @ 2012-08-25  8:59 UTC (permalink / raw)
  To: Cristian Rodríguez; +Cc: netdev, Yuchung Cheng, Neal Cardwell
In-Reply-To: <5038215E.60403@opensuse.org>

On Fri, 2012-08-24 at 20:50 -0400, Cristian Rodríguez wrote:
> Hi, the issue I reported with IPV6 few weeks ago seems to be gone, but
> now I am getting the following crash..
> 
> > Aug 23 11:51:05 ex6 kernel: [55570.280878] Modules linked in: sg st sr_mod cdrom act_police cls_basic cls_flow cls_fw cls_u32 sch_tbf sch_prio sch_htb sch_hfsc sch_ingress sch_sfq bridge stp llc xt_statistic xt_CT xt_LOG xt_realm xt_connlimit xt_addrtype iptable_raw xt_comment xt_recent ipt_ULOG ipt_REJECT ipt_REDIRECT ipt_NETMAP ipt_MASQUERADE ipt_ECN ipt_CLUSTERIP ipt_ah xt_set ip_set nf_nat_tftp nf_nat_snmp_basic nf_conntrack_snmp nf_nat_sip nf_nat_pptp nf_nat_proto_gre nf_nat_irc nf_nat_h323 nf_nat_ftp nf_nat_amanda ts_kmp xt_time xt_TCPMSS xt_sctp nf_conntrack_amanda xt_policy nf_conntrack_sane ip6t_REJECT nf_conntrack_tftp nf_conntrack_ipv6 nf_conntrack_sip ip6table_raw nf_conntrack_proto_udplite ip6table_mangle nf_conntrack_proto_sctp nf_conntrack_pptp nf_conntrack_proto_gre nf_conntrack_netlink nf_conntrack_netbios_ns nf_conntrack_broadcast nf_conntrack_irc nf_conntrack_h323 nf_conntrack_ftp xt_TPROXY nf_tproxy_core nf_defrag_ipv6 xt_tcpmss xt_pkttype xt_physdev xt_owner xt_
> NFQUEUE xt_NFLOG nfnetlink_
> > Aug 23 11:51:05 ex6 kernel: log xt_multiport xt_mark xt_mac xt_limit xt_length xt_iprange xt_helper xt_hashlimit xt_DSCP xt_dscp xt_dccp xt_conntrack xt_connmark xt_CLASSIFY xt_AUDIT xt_tcpudp xt_state iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack iptable_mangle nfnetlink ip6table_filter ip6_tables iptable_filter ip_tables x_tables af_packet cachefiles fscache eeepc_wmi asus_wmi sparse_keymap acpi_cpufreq mperf rfkill pci_hotplug e1000e coretemp wmi kvm_intel i2c_i801 kvm mei pcspkr joydev ghash_clmulni_intel microcode crc32c_intel edd aesni_intel ablk_helper cryptd aes_x86_64 autofs4 hid_generic usbhid i915 xhci_hcd drm_kms_helper drm ehci_hcd i2c_algo_bit usbcore usb_common video button scsi_dh_hp_sw scsi_dh_alua scsi_dh_emc scsi_dh_rdac scsi_dh fan processor thermal thermal_sys megaraid_sas
> > Aug 23 11:51:05 ex6 kernel: [55570.280987] CPU 6 
> > Aug 23 11:51:05 ex6 kernel: [55570.280991] Pid: 15597, comm: httpd2-event Not tainted 3.6.0-rc2-1-default #1 System manufacturer System Product Name/P8B WS
> > Aug 23 11:51:05 ex6 kernel: [55570.280993] RIP: 0010:[<ffffffff81562be0>]  [<ffffffff81562be0>] _raw_spin_lock_bh+0x20/0x30
> > Aug 23 11:51:05 ex6 kernel: [55570.281002] RSP: 0018:ffff88018fc79f08  EFLAGS: 00000297
> > Aug 23 11:51:05 ex6 kernel: [55570.281004] RAX: 0000000000000014 RBX: ffff880407ba4cc0 RCX: 0000000000000001
> > Aug 23 11:51:05 ex6 kernel: [55570.281006] RDX: 0000000000000015 RSI: 0000000000000000 RDI: ffff880194f4c090
> > Aug 23 11:51:05 ex6 kernel: [55570.281007] RBP: 0000000000000002 R08: ffff8804089938f0 R09: 0000000000003ced
> > Aug 23 11:51:05 ex6 kernel: [55570.281009] R10: ffff88041e836800 R11: 0000000000000202 R12: ffff880407ba4d08
> > Aug 23 11:51:05 ex6 kernel: [55570.281011] R13: ffff880407ba4cc0 R14: 0000000000000292 R15: 0000293da5c4986a
> > Aug 23 11:51:05 ex6 kernel: [55570.281013] FS:  00007fcd524e4700(0000) GS:ffff88041f380000(0000) knlGS:0000000000000000
> > Aug 23 11:51:05 ex6 kernel: [55570.281015] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> > Aug 23 11:51:05 ex6 kernel: [55570.281017] CR2: 00007fcd51b59000 CR3: 0000000208ab4000 CR4: 00000000000407e0
> > Aug 23 11:51:05 ex6 kernel: [55570.281019] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > Aug 23 11:51:05 ex6 kernel: [55570.281021] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> > Aug 23 11:51:05 ex6 kernel: [55570.281023] Process httpd2-event (pid: 15597, threadinfo ffff88018fc78000, task ffff880194f5a300)
> > Aug 23 11:51:05 ex6 kernel: [55570.281024] Stack:
> > Aug 23 11:51:05 ex6 kernel: [55570.281025]  ffff880194f4c040 ffffffff8145d45d ffff880194f4c040 ffffffff814d120e
> > Aug 23 11:51:05 ex6 kernel: [55570.281029]  ffff880194f5a300 ffff8804067d2580 0000000000000001 00007fcd60c8eaa0
> > Aug 23 11:51:05 ex6 kernel: [55570.281033]  0004c7e9679f5fbf ffffffff8145ac14 00007fcd589c02e0 0000000100000000
> > Aug 23 11:51:05 ex6 kernel: [55570.281037] Call Trace:
> > Aug 23 11:51:05 ex6 kernel: [55570.281046]  [<ffffffff8145d45d>] lock_sock_nested+0xd/0x30
> > Aug 23 11:51:05 ex6 kernel: [55570.281052]  [<ffffffff814d120e>] inet_shutdown+0x3e/0x130
> > Aug 23 11:51:05 ex6 kernel: [55570.281058]  [<ffffffff8145ac14>] sys_shutdown+0x74/0x80
> > Aug 23 11:51:05 ex6 kernel: [55570.281066]  [<ffffffff8156a47d>] system_call_fastpath+0x1a/0x1f
> > Aug 23 11:51:05 ex6 kernel: [55570.281075]  [<00007fcd5fc42477>] 0x7fcd5fc42476
> > Aug 23 11:51:05 ex6 kernel: [55570.281076] Code: 66 39 d0 75 f6 c3 0f 1f 44 00 00 53 48 89 fb e8 67 88 ae ff b8 00 00 01 00 f0 0f c1 03 89 c2 c1 ea 10 66 39 c2 74 0e 0f 1f 40 00 <f3> 90 0f b7 03 66 39 d0 75 f6 5b c3 90 90 90 90 48 c7 c7 60 74 
> > Aug 23 11:51:24 ex6 cachefilesd[5919]: Refilling cull table
> > Aug 23 11:51:24 ex6 cachefilesd[5919]: Scan complete
> > Aug 23 11:51:33 ex6 kernel: [55598.253247] BUG: soft lockup - CPU#6 stuck for 22s! [httpd2-event:15597]
> > Aug 23 11:51:33 ex6 kernel: [55598.253708] Modules linked in: sg st sr_mod cdrom act_police cls_basic cls_flow cls_fw cls_u32 sch_tbf sch_prio sch_htb sch_hfsc sch_ingress sch_sfq bridge stp llc xt_statistic xt_CT xt_LOG xt_realm xt_connlimit xt_addrtype iptable_raw xt_comment xt_recent ipt_ULOG ipt_REJECT ipt_REDIRECT ipt_NETMAP ipt_MASQUERADE ipt_ECN ipt_CLUSTERIP ipt_ah xt_set ip_set nf_nat_tftp nf_nat_snmp_basic nf_conntrack_snmp nf_nat_sip nf_nat_pptp nf_nat_proto_gre nf_nat_irc nf_nat_h323 nf_nat_ftp nf_nat_amanda ts_kmp xt_time xt_TCPMSS xt_sctp nf_conntrack_amanda xt_policy nf_conntrack_sane ip6t_REJECT nf_conntrack_tftp nf_conntrack_ipv6 nf_conntrack_sip ip6table_raw nf_conntrack_proto_udplite ip6table_mangle nf_conntrack_proto_sctp nf_conntrack_pptp nf_conntrack_proto_gre nf_conntrack_netlink nf_conntrack_netbios_ns nf_conntrack_broadcast nf_conntrack_irc nf_conntrack_h323 nf_conntrack_ftp xt_TPROXY nf_tproxy_core nf_defrag_ipv6 xt_tcpmss xt_pkttype xt_physdev xt_owner xt_
> NFQUEUE xt_NFLOG nfnetlink_
> > Aug 23 11:51:33 ex6 kernel: log xt_multiport xt_mark xt_mac xt_limit xt_length xt_iprange xt_helper xt_hashlimit xt_DSCP xt_dscp xt_dccp xt_conntrack xt_connmark xt_CLASSIFY xt_AUDIT xt_tcpudp xt_state iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack iptable_mangle nfnetlink ip6table_filter ip6_tables iptable_filter ip_tables x_tables af_packet cachefiles fscache eeepc_wmi asus_wmi sparse_keymap acpi_cpufreq mperf rfkill pci_hotplug e1000e coretemp wmi kvm_intel i2c_i801 kvm mei pcspkr joydev ghash_clmulni_intel microcode crc32c_intel edd aesni_intel ablk_helper cryptd aes_x86_64 autofs4 hid_generic usbhid i915 xhci_hcd drm_kms_helper drm ehci_hcd i2c_algo_bit usbcore usb_common video button scsi_dh_hp_sw scsi_dh_alua scsi_dh_emc scsi_dh_rdac scsi_dh fan processor thermal thermal_sys megaraid_sas
> > Aug 23 11:51:33 ex6 kernel: [55598.253818] CPU 6 
> > Aug 23 11:51:33 ex6 kernel: [55598.253822] Pid: 15597, comm: httpd2-event Not tainted 3.6.0-rc2-1-default #1 System manufacturer System Product Name/P8B WS
> > Aug 23 11:51:33 ex6 kernel: [55598.253824] RIP: 0010:[<ffffffff81562be5>]  [<ffffffff81562be5>] _raw_spin_lock_bh+0x25/0x30
> > Aug 23 11:51:33 ex6 kernel: [55598.253833] RSP: 0018:ffff88018fc79f08  EFLAGS: 00000297
> > Aug 23 11:51:33 ex6 kernel: [55598.253835] RAX: 0000000000000014 RBX: ffff880407ba4cc0 RCX: 0000000000000001
> > Aug 23 11:51:33 ex6 kernel: [55598.253837] RDX: 0000000000000015 RSI: 0000000000000000 RDI: ffff880194f4c090
> > Aug 23 11:51:33 ex6 kernel: [55598.253839] RBP: 0000000000000002 R08: ffff8804089938f0 R09: 0000000000003ced
> > Aug 23 11:51:33 ex6 kernel: [55598.253841] R10: ffff88041e836800 R11: 0000000000000202 R12: ffff880407ba4d08
> > Aug 23 11:51:33 ex6 kernel: [55598.253842] R13: ffff880407ba4cc0 R14: 0000000000000292 R15: 0000293da5c4986a
> > Aug 23 11:51:33 ex6 kernel: [55598.253845] FS:  00007fcd524e4700(0000) GS:ffff88041f380000(0000) knlGS:0000000000000000
> > Aug 23 11:51:33 ex6 kernel: [55598.253847] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> > Aug 23 11:51:33 ex6 kernel: [55598.253849] CR2: 00007fcd51b59000 CR3: 0000000208ab4000 CR4: 00000000000407e0
> > Aug 23 11:51:33 ex6 kernel: [55598.253850] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > Aug 23 11:51:33 ex6 kernel: [55598.253852] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> > Aug 23 11:51:33 ex6 kernel: [55598.253855] Process httpd2-event (pid: 15597, threadinfo ffff88018fc78000, task ffff880194f5a300)
> > Aug 23 11:51:33 ex6 kernel: [55598.253856] Stack:
> > Aug 23 11:51:33 ex6 kernel: [55598.253857]  ffff880194f4c040 ffffffff8145d45d ffff880194f4c040 ffffffff814d120e
> > Aug 23 11:51:33 ex6 kernel: [55598.253861]  ffff880194f5a300 ffff8804067d2580 0000000000000001 00007fcd60c8eaa0
> > Aug 23 11:51:33 ex6 kernel: [55598.253865]  0004c7e9679f5fbf ffffffff8145ac14 00007fcd589c02e0 0000000100000000
> > Aug 23 11:51:33 ex6 kernel: [55598.253868] Call Trace:
> > Aug 23 11:51:33 ex6 kernel: [55598.253877]  [<ffffffff8145d45d>] lock_sock_nested+0xd/0x30
> > Aug 23 11:51:33 ex6 kernel: [55598.253885]  [<ffffffff814d120e>] inet_shutdown+0x3e/0x130
> > Aug 23 11:51:33 ex6 kernel: [55598.253892]  [<ffffffff8145ac14>] sys_shutdown+0x74/0x80
> > Aug 23 11:51:33 ex6 kernel: [55598.253900]  [<ffffffff8156a47d>] system_call_fastpath+0x1a/0x1f
> > Aug 23 11:51:33 ex6 kernel: [55598.253909]  [<00007fcd5fc42477>] 0x7fcd5fc42476
> > Aug 23 11:51:33 ex6 kernel: [55598.253910] Code: c3 0f 1f 44 00 00 53 48 89 fb e8 67 88 ae ff b8 00 00 01 00 f0 0f c1 03 89 c2 c1 ea 10 66 39 c2 74 0e 0f 1f 40 00 f3 90 0f b7 03 <66> 39 d0 75 f6 5b c3 90 90 90 90 48 c7 c7 60 74 a5 81 e9 34 d9 
> > Aug 23 11:51:46 ex6 kernel: [55610.629219] INFO: rcu_sched self-detected stall on CPU { 7}  (t=2580171 jiffies)
> > Aug 23 11:51:46 ex6 kernel: [55610.629225] sending NMI to all CPUs:
> > Aug 23 11:51:46 ex6 kernel: [55610.629231] NMI backtrace for cpu 6
> > Aug 23 11:51:46 ex6 kernel: [55610.629234] CPU 6 
> > Aug 23 11:51:46 ex6 kernel: [55610.629239] Pid: 15597, comm: httpd2-event Not tainted 3.6.0-rc2-1-default #1 System manufacturer System Product Name/P8B WS
> > Aug 23 11:51:46 ex6 kernel: [55610.629242] RIP: 0010:[<ffffffff81562be0>]  [<ffffffff81562be0>] _raw_spin_lock_bh+0x20/0x30
> > Aug 23 11:51:46 ex6 kernel: [55610.629252] RSP: 0018:ffff88018fc79f08  EFLAGS: 00000297
> > Aug 23 11:51:46 ex6 kernel: [55610.629255] RAX: 0000000000000014 RBX: ffff880194f4c090 RCX: 0000000000000001
> > Aug 23 11:51:46 ex6 kernel: [55610.629257] RDX: 0000000000000015 RSI: 0000000000000000 RDI: ffff880194f4c090
> > Aug 23 11:51:46 ex6 kernel: [55610.629260] RBP: 0000000000000002 R08: ffff8804089938f0 R09: 0000000000003ced
> > Aug 23 11:51:46 ex6 kernel: [55610.629262] R10: ffff88041e836800 R11: 0000000000000202 R12: ffff8804067d2580
> > Aug 23 11:51:46 ex6 kernel: [55610.629265] R13: 00000000ffffffea R14: 00007fcd60a664a0 R15: 00007fcd51db52b8
> > Aug 23 11:51:46 ex6 kernel: [55610.629268] FS:  00007fcd524e4700(0000) GS:ffff88041f380000(0000) knlGS:0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.629271] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> > Aug 23 11:51:46 ex6 kernel: [55610.629274] CR2: 00007fcd51b59000 CR3: 0000000208ab4000 CR4: 00000000000407e0
> > Aug 23 11:51:46 ex6 kernel: [55610.629277] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.629279] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> > Aug 23 11:51:46 ex6 kernel: [55610.629282] Process httpd2-event (pid: 15597, threadinfo ffff88018fc78000, task ffff880194f5a300)
> > Aug 23 11:51:46 ex6 kernel: [55610.629284] Stack:
> > Aug 23 11:51:46 ex6 kernel: [55610.629286]  ffff880194f4c040 ffffffff8145d45d ffff880194f4c040 ffffffff814d120e
> > Aug 23 11:51:46 ex6 kernel: [55610.629292]  ffff880194f5a300 ffff8804067d2580 0000000000000001 00007fcd60c8eaa0
> > Aug 23 11:51:46 ex6 kernel: [55610.629297]  0004c7e9679f5fbf ffffffff8145ac14 00007fcd589c02e0 0000000100000000
> > Aug 23 11:51:46 ex6 kernel: [55610.629303] Call Trace:
> > Aug 23 11:51:46 ex6 kernel: [55610.629314]  [<ffffffff8145d45d>] lock_sock_nested+0xd/0x30
> > Aug 23 11:51:46 ex6 kernel: [55610.629323]  [<ffffffff814d120e>] inet_shutdown+0x3e/0x130
> > Aug 23 11:51:46 ex6 kernel: [55610.629330]  [<ffffffff8145ac14>] sys_shutdown+0x74/0x80
> > Aug 23 11:51:46 ex6 kernel: [55610.629340]  [<ffffffff8156a47d>] system_call_fastpath+0x1a/0x1f
> > Aug 23 11:51:46 ex6 kernel: [55610.629364]  [<00007fcd5fc42477>] 0x7fcd5fc42476
> > Aug 23 11:51:46 ex6 kernel: [55610.629366] Code: 66 39 d0 75 f6 c3 0f 1f 44 00 00 53 48 89 fb e8 67 88 ae ff b8 00 00 01 00 f0 0f c1 03 89 c2 c1 ea 10 66 39 c2 74 0e 0f 1f 40 00 <f3> 90 0f b7 03 66 39 d0 75 f6 5b c3 90 90 90 90 48 c7 c7 60 74 
> > Aug 23 11:51:46 ex6 kernel: [55610.629413] NMI backtrace for cpu 7
> > Aug 23 11:51:46 ex6 kernel: [55610.629415] CPU 7 
> > Aug 23 11:51:46 ex6 kernel: [55610.629420] Pid: 0, comm: swapper/7 Not tainted 3.6.0-rc2-1-default #1 System manufacturer System Product Name/P8B WS
> > Aug 23 11:51:46 ex6 kernel: [55610.629422] RIP: 0010:[<ffffffff812df109>]  [<ffffffff812df109>] find_next_bit+0x39/0xb0
> > Aug 23 11:51:46 ex6 kernel: [55610.629432] RSP: 0018:ffff88041f3c3938  EFLAGS: 00000046
> > Aug 23 11:51:46 ex6 kernel: [55610.629434] RAX: 0000000000000000 RBX: ffff88041f3ccfe0 RCX: 0000000000000001
> > Aug 23 11:51:46 ex6 kernel: [55610.629437] RDX: 0000000000000001 RSI: 0000000000000200 RDI: 0000000000000200
> > Aug 23 11:51:46 ex6 kernel: [55610.629440] RBP: ffff88041f20d020 R08: ffff88041f3ccfe0 R09: 0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.629442] R10: 0000000000000000 R11: 000000000000c2e2 R12: 000000000000d060
> > Aug 23 11:51:46 ex6 kernel: [55610.629445] R13: 0000000000080000 R14: 00000000000000ff R15: 0000000000000007
> > Aug 23 11:51:46 ex6 kernel: [55610.629448] FS:  0000000000000000(0000) GS:ffff88041f3c0000(0000) knlGS:0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.629451] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> > Aug 23 11:51:46 ex6 kernel: [55610.629454] CR2: 00007fcd2c062ac0 CR3: 0000000001a0c000 CR4: 00000000000407e0
> > Aug 23 11:51:46 ex6 kernel: [55610.629456] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.629459] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> > Aug 23 11:51:46 ex6 kernel: [55610.629462] Process swapper/7 (pid: 0, threadinfo ffff88040abc4000, task ffff88040abc2400)
> > Aug 23 11:51:46 ex6 kernel: [55610.629464] Stack:
> > Aug 23 11:51:46 ex6 kernel: [55610.629465]  ffffffff8102a4e7 0000000081a2cec0 000000000000d020 0000000200000007
> > Aug 23 11:51:46 ex6 kernel: [55610.629471]  0000000000000082 ffff88041f3c39b0 0000000000002710 ffffffff81a2ce00
> > Aug 23 11:51:46 ex6 kernel: [55610.629476]  ffff88040abc4000 0000000000000007 ffff88040abc4000 ffffffff81a2cec0
> > Aug 23 11:51:46 ex6 kernel: [55610.629482] Call Trace:
> > Aug 23 11:51:46 ex6 kernel: [55610.629494]  [<ffffffff8102a4e7>] __x2apic_send_IPI_mask+0xb7/0x1a0
> > Aug 23 11:51:46 ex6 kernel: [55610.629503]  [<ffffffff810260ff>] arch_trigger_all_cpu_backtrace+0x4f/0x90
> > Aug 23 11:51:46 ex6 kernel: [55610.629510]  [<ffffffff810d6d20>] rcu_pending+0x210/0x560
> > Aug 23 11:51:46 ex6 kernel: [55610.629519]  [<ffffffff810d78c0>] rcu_check_callbacks+0x90/0x110
> > Aug 23 11:51:46 ex6 kernel: [55610.629528]  [<ffffffff8105467f>] update_process_times+0x3f/0x80
> > Aug 23 11:51:46 ex6 kernel: [55610.629536]  [<ffffffff810971fb>] tick_sched_timer+0x6b/0xe0
> > Aug 23 11:51:46 ex6 kernel: [55610.629544]  [<ffffffff810699a6>] __run_hrtimer+0x66/0x1d0
> > Aug 23 11:51:46 ex6 kernel: [55610.629552]  [<ffffffff8106a299>] hrtimer_interrupt+0xe9/0x210
> > Aug 23 11:51:46 ex6 kernel: [55610.629559]  [<ffffffff81024e93>] smp_apic_timer_interrupt+0x63/0xa0
> > Aug 23 11:51:46 ex6 kernel: [55610.629567]  [<ffffffff8156b0fa>] apic_timer_interrupt+0x6a/0x70
> > Aug 23 11:51:46 ex6 kernel: [55610.629578]  [<ffffffff814c2c78>] tcp_slow_start+0x68/0xa0
> > Aug 23 11:51:46 ex6 kernel: [55610.629585]  [<ffffffff814b6260>] tcp_ack+0x560/0x11e0
> > Aug 23 11:51:46 ex6 kernel: [55610.629593]  [<ffffffff814b715d>] tcp_rcv_established+0x27d/0x8e0
> > Aug 23 11:51:46 ex6 kernel: [55610.629601]  [<ffffffff814c045e>] tcp_v4_do_rcv+0xde/0x340
> > Aug 23 11:51:46 ex6 kernel: [55610.629609]  [<ffffffff814c173b>] tcp_v4_rcv+0x59b/0x850
> > Aug 23 11:51:46 ex6 kernel: [55610.629617]  [<ffffffff8149e156>] ip_local_deliver_finish+0xd6/0x250
> > Aug 23 11:51:46 ex6 kernel: [55610.629625]  [<ffffffff8146eb5e>] __netif_receive_skb+0x67e/0x7e0
> > Aug 23 11:51:46 ex6 kernel: [55610.629633]  [<ffffffff8146ed61>] process_backlog+0xa1/0x180
> > Aug 23 11:51:46 ex6 kernel: [55610.629639]  [<ffffffff8146f830>] net_rx_action+0x140/0x230
> > Aug 23 11:51:46 ex6 kernel: [55610.629647]  [<ffffffff8104be2e>] __do_softirq+0xbe/0x1f0
> > Aug 23 11:51:46 ex6 kernel: [55610.629655]  [<ffffffff8156b7ec>] call_softirq+0x1c/0x30
> > Aug 23 11:51:46 ex6 kernel: [55610.629662]  [<ffffffff810045a5>] do_softirq+0x75/0xb0
> > Aug 23 11:51:46 ex6 kernel: [55610.629669]  [<ffffffff8104c1e5>] irq_exit+0xa5/0xb0
> > Aug 23 11:51:46 ex6 kernel: [55610.629677]  [<ffffffff8156b2ba>] call_function_single_interrupt+0x6a/0x70
> > Aug 23 11:51:46 ex6 kernel: [55610.629686]  [<ffffffff813303cc>] intel_idle+0xec/0x160
> > Aug 23 11:51:46 ex6 kernel: [55610.629695]  [<ffffffff8143566d>] cpuidle_idle_call+0x9d/0x240
> > Aug 23 11:51:46 ex6 kernel: [55610.629702]  [<ffffffff8100b715>] cpu_idle+0x65/0xd0
> > Aug 23 11:51:46 ex6 kernel: [55610.629710]  [<ffffffff81550547>] start_secondary+0x1fe/0x203
> > Aug 23 11:51:46 ex6 kernel: [55610.629713] Code: d1 49 89 d1 48 c1 e9 06 49 83 e1 c0 4c 8d 04 cf 48 89 f7 48 89 d1 4c 29 cf 83 e1 3f 74 40 48 c7 c0 ff ff ff ff 48 d3 e0 49 23 00 <48> 83 ff 3f 76 41 48 85 c0 75 52 49 83 c0 08 48 83 ef 40 49 83 
> > Aug 23 11:51:46 ex6 kernel: [55610.629761] NMI backtrace for cpu 1
> > Aug 23 11:51:46 ex6 kernel: [55610.629765] CPU 1 
> > Aug 23 11:51:46 ex6 kernel: [55610.629769] Pid: 0, comm: swapper/1 Not tainted 3.6.0-rc2-1-default #1 System manufacturer System Product Name/P8B WS
> > Aug 23 11:51:46 ex6 kernel: [55610.629772] RIP: 0010:[<ffffffff815628dd>]  [<ffffffff815628dd>] _raw_spin_lock+0x1d/0x30
> > Aug 23 11:51:46 ex6 kernel: [55610.629781] RSP: 0018:ffff88041f243e48  EFLAGS: 00000293
> > Aug 23 11:51:46 ex6 kernel: [55610.629784] RAX: 0000000000000014 RBX: ffff880194f4c040 RCX: 0000000100c76001
> > Aug 23 11:51:46 ex6 kernel: [55610.629787] RDX: 0000000000000016 RSI: 0000000000000286 RDI: ffff880194f4c090
> > Aug 23 11:51:46 ex6 kernel: [55610.629789] RBP: ffff88040abd4000 R08: ffff88040701a29c R09: 0000000000000028
> > Aug 23 11:51:46 ex6 kernel: [55610.629792] R10: dead000000200200 R11: 0000000000000000 R12: 0000000000000100
> > Aug 23 11:51:46 ex6 kernel: [55610.629794] R13: ffffffff814bd160 R14: ffff880194f4c040 R15: 0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.629798] FS:  0000000000000000(0000) GS:ffff88041f240000(0000) knlGS:0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.629800] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> > Aug 23 11:51:46 ex6 kernel: [55610.629803] CR2: 00007fa566135010 CR3: 0000000001a0c000 CR4: 00000000000407e0
> > Aug 23 11:51:46 ex6 kernel: [55610.629806] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.629808] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> > Aug 23 11:51:46 ex6 kernel: [55610.629811] Process swapper/1 (pid: 0, threadinfo ffff88040aba6000, task ffff88040aba4280)
> > Aug 23 11:51:46 ex6 kernel: [55610.629813] Stack:
> > Aug 23 11:51:46 ex6 kernel: [55610.629815]  ffffffff814bd171 ffff88040abd4000 0000000000000100 ffff880194f4c200ug 23 11:51:05 ex6 kernel: [55570.280878] Modules linked in: sg st sr_mod cdrom act_police cls_basic cls_flow cls_fw cls_u32 sch_tbf sch_prio sch_htb sch_hfsc sch_ingress sch_sfq bridge stp llc xt_statistic xt_CT xt_LOG xt_realm xt_connlimit xt_addrtype iptable_raw xt_comment xt_recent ipt_ULOG ipt_REJECT ipt_REDIRECT ipt_NETMAP ipt_MASQUERADE ipt_ECN ipt_CLUSTERIP ipt_ah xt_set ip_set nf_nat_tftp nf_nat_snmp_basic nf_conntrack_snmp nf_nat_sip nf_nat_pptp nf_nat_proto_gre nf_nat_irc nf_nat_h323 nf_nat_ftp nf_nat_amanda ts_kmp xt_time xt_TCPMSS xt_sctp nf_conntrack_amanda xt_policy nf_conntrack_sane ip6t_REJECT nf_conntrack_tftp nf_conntrack_ipv6 nf_conntrack_sip ip6table_raw nf_conntrack_proto_udplite ip6table_mangle nf_conntrack_proto_sctp nf_conntrack_pptp nf_conntrack_proto_gre nf_conntrack_netlink nf_conntrack_netbios_ns nf_conntrack_broadcast nf_conntrack_irc nf_conntr
> ack_h323 nf_conntrack_ftp xt_TPROXY nf_tproxy_core nf_defrag_ipv6 xt_tcpmss xt_pkttype xt_physdev xt_owner xt_NFQUEUE xt_NFLOG nfnetlink_
> Aug 23 11:51:05 ex6 kernel: log xt_multiport xt_mark xt_mac xt_limit
> xt_length xt_iprange xt_helper xt_hashlimit xt_DSCP xt_dscp xt_dccp
> xt_conntrack xt_connmark xt_CLASSIFY xt_AUDIT xt_tcpudp xt_state
> iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack
> iptable_mangle nfnetlink ip6table_filter ip6_tables iptable_filter
> ip_tables x_tables af_packet cachefiles fscache eeepc_wmi asus_wmi
> sparse_keymap acpi_cpufreq mperf rfkill pci_hotplug e1000e coretemp wmi
> kvm_intel i2c_i801 kvm mei pcspkr joydev ghash_clmulni_intel microcode
> crc32c_intel edd aesni_intel ablk_helper cryptd aes_x86_64 autofs4
> hid_generic usbhid i915 xhci_hcd drm_kms_helper drm ehci_hcd
> i2c_algo_bit usbcore usb_common video button scsi_dh_hp_sw scsi_dh_alua
> scsi_dh_emc scsi_dh_rdac scsi_dh fan processor thermal thermal_sys
> megaraid_sas
> Aug 23 11:51:05 ex6 kernel: [55570.280987] CPU 6
> Aug 23 11:51:05 ex6 kernel: [55570.280991] Pid: 15597, comm:
> httpd2-event Not tainted 3.6.0-rc2-1-default #1 System manufacturer
> System Product Name/P8B WS
> Aug 23 11:51:05 ex6 kernel: [55570.280993] RIP:
> 0010:[<ffffffff81562be0>]  [<ffffffff81562be0>] _raw_spin_lock_bh+0x20/0x30
> Aug 23 11:51:05 ex6 kernel: [55570.281002] RSP: 0018:ffff88018fc79f08
> EFLAGS: 00000297
> Aug 23 11:51:05 ex6 kernel: [55570.281004] RAX: 0000000000000014 RBX:
> ffff880407ba4cc0 RCX: 0000000000000001
> Aug 23 11:51:05 ex6 kernel: [55570.281006] RDX: 0000000000000015 RSI:
> 0000000000000000 RDI: ffff880194f4c090
> Aug 23 11:51:05 ex6 kernel: [55570.281007] RBP: 0000000000000002 R08:
> ffff8804089938f0 R09: 0000000000003ced
> Aug 23 11:51:05 ex6 kernel: [55570.281009] R10: ffff88041e836800 R11:
> 0000000000000202 R12: ffff880407ba4d08
> Aug 23 11:51:05 ex6 kernel: [55570.281011] R13: ffff880407ba4cc0 R14:
> 0000000000000292 R15: 0000293da5c4986a
> Aug 23 11:51:05 ex6 kernel: [55570.281013] FS:  00007fcd524e4700(0000)
> GS:ffff88041f380000(0000) knlGS:0000000000000000
> Aug 23 11:51:05 ex6 kernel: [55570.281015] CS:  0010 DS: 0000 ES: 0000
> CR0: 000000008005003b
> Aug 23 11:51:05 ex6 kernel: [55570.281017] CR2: 00007fcd51b59000 CR3:
> 0000000208ab4000 CR4: 00000000000407e0
> Aug 23 11:51:05 ex6 kernel: [55570.281019] DR0: 0000000000000000 DR1:
> 0000000000000000 DR2: 0000000000000000
> Aug 23 11:51:05 ex6 kernel: [55570.281021] DR3: 0000000000000000 DR6:
> 00000000ffff0ff0 DR7: 0000000000000400
> Aug 23 11:51:05 ex6 kernel: [55570.281023] Process httpd2-event (pid:
> 15597, threadinfo ffff88018fc78000, task ffff880194f5a300)
> Aug 23 11:51:05 ex6 kernel: [55570.281024] Stack:
> Aug 23 11:51:05 ex6 kernel: [55570.281025]  ffff880194f4c040
> ffffffff8145d45d ffff880194f4c040 ffffffff814d120e
> Aug 23 11:51:05 ex6 kernel: [55570.281029]  ffff880194f5a300
> ffff8804067d2580 0000000000000001 00007fcd60c8eaa0
> Aug 23 11:51:05 ex6 kernel: [55570.281033]  0004c7e9679f5fbf
> ffffffff8145ac14 00007fcd589c02e0 0000000100000000
> Aug 23 11:51:05 ex6 kernel: [55570.281037] Call Trace:
> Aug 23 11:51:05 ex6 kernel: [55570.281046]  [<ffffffff8145d45d>]
> lock_sock_nested+0xd/0x30
> Aug 23 11:51:05 ex6 kernel: [55570.281052]  [<ffffffff814d120e>]
> inet_shutdown+0x3e/0x130
> Aug 23 11:51:05 ex6 kernel: [55570.281058]  [<ffffffff8145ac14>]
> sys_shutdown+0x74/0x80
> Aug 23 11:51:05 ex6 kernel: [55570.281066]  [<ffffffff8156a47d>]
> system_call_fastpath+0x1a/0x1f
> Aug 23 11:51:05 ex6 kernel: [55570.281075]  [<00007fcd5fc42477>]
> 0x7fcd5fc42476
> Aug 23 11:51:05 ex6 kernel: [55570.281076] Code: 66 39 d0 75 f6 c3 0f 1f
> 44 00 00 53 48 89 fb e8 67 88 ae ff b8 00 00 01 00 f0 0f c1 03 89 c2 c1
> ea 10 66 39 c2 74 0e 0f 1f 40 00 <f3> 90 0f b7 03 66 39 d0 75 f6 5b c3
> 90 90 90 90 48 c7 c7 60 74
> Aug 23 11:51:24 ex6 cachefilesd[5919]: Refilling cull table
> Aug 23 11:51:24 ex6 cachefilesd[5919]: Scan complete
> Aug 23 11:51:33 ex6 kernel: [55598.253247] BUG: soft lockup - CPU#6
> stuck for 22s! [httpd2-event:15597]
> Aug 23 11:51:33 ex6 kernel: [55598.253708] Modules linked in: sg st
> sr_mod cdrom act_police cls_basic cls_flow cls_fw cls_u32 sch_tbf
> sch_prio sch_htb sch_hfsc sch_ingress sch_sfq bridge stp llc
> xt_statistic xt_CT xt_LOG xt_realm xt_connlimit xt_addrtype iptable_raw
> xt_comment xt_recent ipt_ULOG ipt_REJECT ipt_REDIRECT ipt_NETMAP
> ipt_MASQUERADE ipt_ECN ipt_CLUSTERIP ipt_ah xt_set ip_set nf_nat_tftp
> nf_nat_snmp_basic nf_conntrack_snmp nf_nat_sip nf_nat_pptp
> nf_nat_proto_gre nf_nat_irc nf_nat_h323 nf_nat_ftp nf_nat_amanda ts_kmp
> xt_time xt_TCPMSS xt_sctp nf_conntrack_amanda xt_policy
> nf_conntrack_sane ip6t_REJECT nf_conntrack_tftp nf_conntrack_ipv6
> nf_conntrack_sip ip6table_raw nf_conntrack_proto_udplite ip6table_mangle
> nf_conntrack_proto_sctp nf_conntrack_pptp nf_conntrack_proto_gre
> nf_conntrack_netlink nf_conntrack_netbios_ns nf_conntrack_broadcast
> nf_conntrack_irc nf_conntrack_h323 nf_conntrack_ftp xt_TPROXY
> nf_tproxy_core nf_defrag_ipv6 xt_tcpmss xt_pkttype xt_physdev xt_owner
> xt_NFQUEUE xt_NFLOG nfnetlink_
> Aug 23 11:51:33 ex6 kernel: log xt_multiport xt_mark xt_mac xt_limit
> xt_length xt_iprange xt_helper xt_hashlimit xt_DSCP xt_dscp xt_dccp
> xt_conntrack xt_connmark xt_CLASSIFY xt_AUDIT xt_tcpudp xt_state
> iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack
> iptable_mangle nfnetlink ip6table_filter ip6_tables iptable_filter
> ip_tables x_tables af_packet cachefiles fscache eeepc_wmi asus_wmi
> sparse_keymap acpi_cpufreq mperf rfkill pci_hotplug e1000e coretemp wmi
> kvm_intel i2c_i801 kvm mei pcspkr joydev ghash_clmulni_intel microcode
> crc32c_intel edd aesni_intel ablk_helper cryptd aes_x86_64 autofs4
> hid_generic usbhid i915 xhci_hcd drm_kms_helper drm ehci_hcd
> i2c_algo_bit usbcore usb_common video button scsi_dh_hp_sw scsi_dh_alua
> scsi_dh_emc scsi_dh_rdac scsi_dh fan processor thermal thermal_sys
> megaraid_sas
> Aug 23 11:51:33 ex6 kernel: [55598.253818] CPU 6
> Aug 23 11:51:33 ex6 kernel: [55598.253822] Pid: 15597, comm:
> httpd2-event Not tainted 3.6.0-rc2-1-default #1 System manufacturer
> System Product Name/P8B WS
> Aug 23 11:51:33 ex6 kernel: [55598.253824] RIP:
> 0010:[<ffffffff81562be5>]  [<ffffffff81562be5>] _raw_spin_lock_bh+0x25/0x30
> Aug 23 11:51:33 ex6 kernel: [55598.253833] RSP: 0018:ffff88018fc79f08
> EFLAGS: 00000297
> Aug 23 11:51:33 ex6 kernel: [55598.253835] RAX: 0000000000000014 RBX:
> ffff880407ba4cc0 RCX: 0000000000000001
> Aug 23 11:51:33 ex6 kernel: [55598.253837] RDX: 0000000000000015 RSI:
> 0000000000000000 RDI: ffff880194f4c090
> Aug 23 11:51:33 ex6 kernel: [55598.253839] RBP: 0000000000000002 R08:
> ffff8804089938f0 R09: 0000000000003ced
> Aug 23 11:51:33 ex6 kernel: [55598.253841] R10: ffff88041e836800 R11:
> 0000000000000202 R12: ffff880407ba4d08
> Aug 23 11:51:33 ex6 kernel: [55598.253842] R13: ffff880407ba4cc0 R14:
> 0000000000000292 R15: 0000293da5c4986a
> Aug 23 11:51:33 ex6 kernel: [55598.253845] FS:  00007fcd524e4700(0000)
> GS:ffff88041f380000(0000) knlGS:0000000000000000
> Aug 23 11:51:33 ex6 kernel: [55598.253847] CS:  0010 DS: 0000 ES: 0000
> CR0: 000000008005003b
> Aug 23 11:51:33 ex6 kernel: [55598.253849] CR2: 00007fcd51b59000 CR3:
> 0000000208ab4000 CR4: 00000000000407e0
> Aug 23 11:51:33 ex6 kernel: [55598.253850] DR0: 0000000000000000 DR1:
> 0000000000000000 DR2: 0000000000000000
> Aug 23 11:51:33 ex6 kernel: [55598.253852] DR3: 0000000000000000 DR6:
> 00000000ffff0ff0 DR7: 0000000000000400
> Aug 23 11:51:33 ex6 kernel: [55598.253855] Process httpd2-event (pid:
> 15597, threadinfo ffff88018fc78000, task ffff880194f5a300)
> Aug 23 11:51:33 ex6 kernel: [55598.253856] Stack:
> Aug 23 11:51:33 ex6 kernel: [55598.253857]  ffff880194f4c040
> ffffffff8145d45d ffff880194f4c040 ffffffff814d120e
> Aug 23 11:51:33 ex6 kernel: [55598.253861]  ffff880194f5a300
> ffff8804067d2580 0000000000000001 00007fcd60c8eaa0
> Aug 23 11:51:33 ex6 kernel: [55598.253865]  0004c7e9679f5fbf
> ffffffff8145ac14 00007fcd589c02e0 0000000100000000
> Aug 23 11:51:33 ex6 kernel: [55598.253868] Call Trace:
> Aug 23 11:51:33 ex6 kernel: [55598.253877]  [<ffffffff8145d45d>]
> lock_sock_nested+0xd/0x30
> Aug 23 11:51:33 ex6 kernel: [55598.253885]  [<ffffffff814d120e>]
> inet_shutdown+0x3e/0x130
> Aug 23 11:51:33 ex6 kernel: [55598.253892]  [<ffffffff8145ac14>]
> sys_shutdown+0x74/0x80
> Aug 23 11:51:33 ex6 kernel: [55598.253900]  [<ffffffff8156a47d>]
> system_call_fastpath+0x1a/0x1f
> Aug 23 11:51:33 ex6 kernel: [55598.253909]  [<00007fcd5fc42477>]
> 0x7fcd5fc42476
> Aug 23 11:51:33 ex6 kernel: [55598.253910] Code: c3 0f 1f 44 00 00 53 48
> 89 fb e8 67 88 ae ff b8 00 00 01 00 f0 0f c1 03 89 c2 c1 ea 10 66 39 c2
> 74 0e 0f 1f 40 00 f3 90 0f b7 03 <66> 39 d0 75 f6 5b c3 90 90 90 90 48
> c7 c7 60 74 a5 81 e9 34 d9
> Aug 23 11:51:46 ex6 kernel: [55610.629219] INFO: rcu_sched self-detected
> stall on CPU { 7}  (t=2580171 jiffies)
> Aug 23 11:51:46 ex6 kernel: [55610.629225] sending NMI to all CPUs:
> Aug 23 11:51:46 ex6 kernel: [55610.629231] NMI backtrace for cpu 6
> Aug 23 11:51:46 ex6 kernel: [55610.629234] CPU 6
> Aug 23 11:51:46 ex6 kernel: [55610.629239] Pid: 15597, comm:
> httpd2-event Not tainted 3.6.0-rc2-1-default #1 System manufacturer
> System Product Name/P8B WS
> Aug 23 11:51:46 ex6 kernel: [55610.629242] RIP:
> 0010:[<ffffffff81562be0>]  [<ffffffff81562be0>] _raw_spin_lock_bh+0x20/0x30
> Aug 23 11:51:46 ex6 kernel: [55610.629252] RSP: 0018:ffff88018fc79f08
> EFLAGS: 00000297
> Aug 23 11:51:46 ex6 kernel: [55610.629255] RAX: 0000000000000014 RBX:
> ffff880194f4c090 RCX: 0000000000000001
> Aug 23 11:51:46 ex6 kernel: [55610.629257] RDX: 0000000000000015 RSI:
> 0000000000000000 RDI: ffff880194f4c090
> Aug 23 11:51:46 ex6 kernel: [55610.629260] RBP: 0000000000000002 R08:
> ffff8804089938f0 R09: 0000000000003ced
> Aug 23 11:51:46 ex6 kernel: [55610.629262] R10: ffff88041e836800 R11:
> 0000000000000202 R12: ffff8804067d2580
> Aug 23 11:51:46 ex6 kernel: [55610.629265] R13: 00000000ffffffea R14:
> 00007fcd60a664a0 R15: 00007fcd51db52b8
> Aug 23 11:51:46 ex6 kernel: [55610.629268] FS:  00007fcd524e4700(0000)
> GS:ffff88041f380000(0000) knlGS:0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.629271] CS:  0010 DS: 0000 ES: 0000
> CR0: 000000008005003b
> Aug 23 11:51:46 ex6 kernel: [55610.629274] CR2: 00007fcd51b59000 CR3:
> 0000000208ab4000 CR4: 00000000000407e0
> Aug 23 11:51:46 ex6 kernel: [55610.629277] DR0: 0000000000000000 DR1:
> 0000000000000000 DR2: 0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.629279] DR3: 0000000000000000 DR6:
> 00000000ffff0ff0 DR7: 0000000000000400
> Aug 23 11:51:46 ex6 kernel: [55610.629282] Process httpd2-event (pid:
> 15597, threadinfo ffff88018fc78000, task ffff880194f5a300)
> Aug 23 11:51:46 ex6 kernel: [55610.629284] Stack:
> Aug 23 11:51:46 ex6 kernel: [55610.629286]  ffff880194f4c040
> ffffffff8145d45d ffff880194f4c040 ffffffff814d120e
> Aug 23 11:51:46 ex6 kernel: [55610.629292]  ffff880194f5a300
> ffff8804067d2580 0000000000000001 00007fcd60c8eaa0
> Aug 23 11:51:46 ex6 kernel: [55610.629297]  0004c7e9679f5fbf
> ffffffff8145ac14 00007fcd589c02e0 0000000100000000
> Aug 23 11:51:46 ex6 kernel: [55610.629303] Call Trace:
> Aug 23 11:51:46 ex6 kernel: [55610.629314]  [<ffffffff8145d45d>]
> lock_sock_nested+0xd/0x30
> Aug 23 11:51:46 ex6 kernel: [55610.629323]  [<ffffffff814d120e>]
> inet_shutdown+0x3e/0x130
> Aug 23 11:51:46 ex6 kernel: [55610.629330]  [<ffffffff8145ac14>]
> sys_shutdown+0x74/0x80
> Aug 23 11:51:46 ex6 kernel: [55610.629340]  [<ffffffff8156a47d>]
> system_call_fastpath+0x1a/0x1f
> Aug 23 11:51:46 ex6 kernel: [55610.629364]  [<00007fcd5fc42477>]
> 0x7fcd5fc42476
> Aug 23 11:51:46 ex6 kernel: [55610.629366] Code: 66 39 d0 75 f6 c3 0f 1f
> 44 00 00 53 48 89 fb e8 67 88 ae ff b8 00 00 01 00 f0 0f c1 03 89 c2 c1
> ea 10 66 39 c2 74 0e 0f 1f 40 00 <f3> 90 0f b7 03 66 39 d0 75 f6 5b c3
> 90 90 90 90 48 c7 c7 60 74
> Aug 23 11:51:46 ex6 kernel: [55610.629413] NMI backtrace for cpu 7
> Aug 23 11:51:46 ex6 kernel: [55610.629415] CPU 7
> Aug 23 11:51:46 ex6 kernel: [55610.629420] Pid: 0, comm: swapper/7 Not
> tainted 3.6.0-rc2-1-default #1 System manufacturer System Product
> Name/P8B WS
> Aug 23 11:51:46 ex6 kernel: [55610.629422] RIP:
> 0010:[<ffffffff812df109>]  [<ffffffff812df109>] find_next_bit+0x39/0xb0
> Aug 23 11:51:46 ex6 kernel: [55610.629432] RSP: 0018:ffff88041f3c3938
> EFLAGS: 00000046
> Aug 23 11:51:46 ex6 kernel: [55610.629434] RAX: 0000000000000000 RBX:
> ffff88041f3ccfe0 RCX: 0000000000000001
> Aug 23 11:51:46 ex6 kernel: [55610.629437] RDX: 0000000000000001 RSI:
> 0000000000000200 RDI: 0000000000000200
> Aug 23 11:51:46 ex6 kernel: [55610.629440] RBP: ffff88041f20d020 R08:
> ffff88041f3ccfe0 R09: 0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.629442] R10: 0000000000000000 R11:
> 000000000000c2e2 R12: 000000000000d060
> Aug 23 11:51:46 ex6 kernel: [55610.629445] R13: 0000000000080000 R14:
> 00000000000000ff R15: 0000000000000007
> Aug 23 11:51:46 ex6 kernel: [55610.629448] FS:  0000000000000000(0000)
> GS:ffff88041f3c0000(0000) knlGS:0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.629451] CS:  0010 DS: 0000 ES: 0000
> CR0: 000000008005003b
> Aug 23 11:51:46 ex6 kernel: [55610.629454] CR2: 00007fcd2c062ac0 CR3:
> 0000000001a0c000 CR4: 00000000000407e0
> Aug 23 11:51:46 ex6 kernel: [55610.629456] DR0: 0000000000000000 DR1:
> 0000000000000000 DR2: 0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.629459] DR3: 0000000000000000 DR6:
> 00000000ffff0ff0 DR7: 0000000000000400
> Aug 23 11:51:46 ex6 kernel: [55610.629462] Process swapper/7 (pid: 0,
> threadinfo ffff88040abc4000, task ffff88040abc2400)
> Aug 23 11:51:46 ex6 kernel: [55610.629464] Stack:
> Aug 23 11:51:46 ex6 kernel: [55610.629465]  ffffffff8102a4e7
> 0000000081a2cec0 000000000000d020 0000000200000007
> Aug 23 11:51:46 ex6 kernel: [55610.629471]  0000000000000082
> ffff88041f3c39b0 0000000000002710 ffffffff81a2ce00
> Aug 23 11:51:46 ex6 kernel: [55610.629476]  ffff88040abc4000
> 0000000000000007 ffff88040abc4000 ffffffff81a2cec0
> Aug 23 11:51:46 ex6 kernel: [55610.629482] Call Trace:
> Aug 23 11:51:46 ex6 kernel: [55610.629494]  [<ffffffff8102a4e7>]
> __x2apic_send_IPI_mask+0xb7/0x1a0
> Aug 23 11:51:46 ex6 kernel: [55610.629503]  [<ffffffff810260ff>]
> arch_trigger_all_cpu_backtrace+0x4f/0x90
> Aug 23 11:51:46 ex6 kernel: [55610.629510]  [<ffffffff810d6d20>]
> rcu_pending+0x210/0x560
> Aug 23 11:51:46 ex6 kernel: [55610.629519]  [<ffffffff810d78c0>]
> rcu_check_callbacks+0x90/0x110
> Aug 23 11:51:46 ex6 kernel: [55610.629528]  [<ffffffff8105467f>]
> update_process_times+0x3f/0x80
> Aug 23 11:51:46 ex6 kernel: [55610.629536]  [<ffffffff810971fb>]
> tick_sched_timer+0x6b/0xe0
> Aug 23 11:51:46 ex6 kernel: [55610.629544]  [<ffffffff810699a6>]
> __run_hrtimer+0x66/0x1d0
> Aug 23 11:51:46 ex6 kernel: [55610.629552]  [<ffffffff8106a299>]
> hrtimer_interrupt+0xe9/0x210
> Aug 23 11:51:46 ex6 kernel: [55610.629559]  [<ffffffff81024e93>]
> smp_apic_timer_interrupt+0x63/0xa0
> Aug 23 11:51:46 ex6 kernel: [55610.629567]  [<ffffffff8156b0fa>]
> apic_timer_interrupt+0x6a/0x70
> Aug 23 11:51:46 ex6 kernel: [55610.629578]  [<ffffffff814c2c78>]
> tcp_slow_start+0x68/0xa0
> Aug 23 11:51:46 ex6 kernel: [55610.629585]  [<ffffffff814b6260>]
> tcp_ack+0x560/0x11e0
> Aug 23 11:51:46 ex6 kernel: [55610.629593]  [<ffffffff814b715d>]
> tcp_rcv_established+0x27d/0x8e0
> Aug 23 11:51:46 ex6 kernel: [55610.629601]  [<ffffffff814c045e>]
> tcp_v4_do_rcv+0xde/0x340
> Aug 23 11:51:46 ex6 kernel: [55610.629609]  [<ffffffff814c173b>]
> tcp_v4_rcv+0x59b/0x850
> Aug 23 11:51:46 ex6 kernel: [55610.629617]  [<ffffffff8149e156>]
> ip_local_deliver_finish+0xd6/0x250
> Aug 23 11:51:46 ex6 kernel: [55610.629625]  [<ffffffff8146eb5e>]
> __netif_receive_skb+0x67e/0x7e0
> Aug 23 11:51:46 ex6 kernel: [55610.629633]  [<ffffffff8146ed61>]
> process_backlog+0xa1/0x180
> Aug 23 11:51:46 ex6 kernel: [55610.629639]  [<ffffffff8146f830>]
> net_rx_action+0x140/0x230
> Aug 23 11:51:46 ex6 kernel: [55610.629647]  [<ffffffff8104be2e>]
> __do_softirq+0xbe/0x1f0
> Aug 23 11:51:46 ex6 kernel: [55610.629655]  [<ffffffff8156b7ec>]
> call_softirq+0x1c/0x30
> Aug 23 11:51:46 ex6 kernel: [55610.629662]  [<ffffffff810045a5>]
> do_softirq+0x75/0xb0
> Aug 23 11:51:46 ex6 kernel: [55610.629669]  [<ffffffff8104c1e5>]
> irq_exit+0xa5/0xb0
> Aug 23 11:51:46 ex6 kernel: [55610.629677]  [<ffffffff8156b2ba>]
> call_function_single_interrupt+0x6a/0x70
> Aug 23 11:51:46 ex6 kernel: [55610.629686]  [<ffffffff813303cc>]
> intel_idle+0xec/0x160
> Aug 23 11:51:46 ex6 kernel: [55610.629695]  [<ffffffff8143566d>]
> cpuidle_idle_call+0x9d/0x240
> Aug 23 11:51:46 ex6 kernel: [55610.629702]  [<ffffffff8100b715>]
> cpu_idle+0x65/0xd0
> Aug 23 11:51:46 ex6 kernel: [55610.629710]  [<ffffffff81550547>]
> start_secondary+0x1fe/0x203
> Aug 23 11:51:46 ex6 kernel: [55610.629713] Code: d1 49 89 d1 48 c1 e9 06
> 49 83 e1 c0 4c 8d 04 cf 48 89 f7 48 89 d1 4c 29 cf 83 e1 3f 74 40 48 c7
> c0 ff ff ff ff 48 d3 e0 49 23 00 <48> 83 ff 3f 76 41 48 85 c0 75 52 49
> 83 c0 08 48 83 ef 40 49 83
> Aug 23 11:51:46 ex6 kernel: [55610.629761] NMI backtrace for cpu 1
> Aug 23 11:51:46 ex6 kernel: [55610.629765] CPU 1
> Aug 23 11:51:46 ex6 kernel: [55610.629769] Pid: 0, comm: swapper/1 Not
> tainted 3.6.0-rc2-1-default #1 System manufacturer System Product
> Name/P8B WS
> Aug 23 11:51:46 ex6 kernel: [55610.629772] RIP:
> 0010:[<ffffffff815628dd>]  [<ffffffff815628dd>] _raw_spin_lock+0x1d/0x30
> Aug 23 11:51:46 ex6 kernel: [55610.629781] RSP: 0018:ffff88041f243e48
> EFLAGS: 00000293
> Aug 23 11:51:46 ex6 kernel: [55610.629784] RAX: 0000000000000014 RBX:
> ffff880194f4c040 RCX: 0000000100c76001
> Aug 23 11:51:46 ex6 kernel: [55610.629787] RDX: 0000000000000016 RSI:
> 0000000000000286 RDI: ffff880194f4c090
> Aug 23 11:51:46 ex6 kernel: [55610.629789] RBP: ffff88040abd4000 R08:
> ffff88040701a29c R09: 0000000000000028
> Aug 23 11:51:46 ex6 kernel: [55610.629792] R10: dead000000200200 R11:
> 0000000000000000 R12: 0000000000000100
> Aug 23 11:51:46 ex6 kernel: [55610.629794] R13: ffffffff814bd160 R14:
> ffff880194f4c040 R15: 0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.629798] FS:  0000000000000000(0000)
> GS:ffff88041f240000(0000) knlGS:0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.629800] CS:  0010 DS: 0000 ES: 0000
> CR0: 000000008005003b
> Aug 23 11:51:46 ex6 kernel: [55610.629803] CR2: 00007fa566135010 CR3:
> 0000000001a0c000 CR4: 00000000000407e0
> Aug 23 11:51:46 ex6 kernel: [55610.629806] DR0: 0000000000000000 DR1:
> 0000000000000000 DR2: 0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.629808] DR3: 0000000000000000 DR6:
> 00000000ffff0ff0 DR7: 0000000000000400
> Aug 23 11:51:46 ex6 kernel: [55610.629811] Process swapper/1 (pid: 0,
> threadinfo ffff88040aba6000, task ffff88040aba4280)
> Aug 23 11:51:46 ex6 kernel: [55610.629813] Stack:
> Aug 23 11:51:46 ex6 kernel: [55610.629815]  ffffffff814bd171
> ffff88040abd4000 0000000000000100 ffff880194f4c200
> Aug 23 11:51:46 ex6 kernel: [55610.629820]  ffffffff81053ac1
> 0000000000000000 ffff88041f243ea0 ffff88040aba7fd8
> Aug 23 11:51:46 ex6 kernel: [55610.629825]  ffff88040aba7fd8
> ffff88040aba7fd8 ffff88040abd5028 ffff88041f243ea0
> Aug 23 11:51:46 ex6 kernel: [55610.629831] Call Trace:
> Aug 23 11:51:46 ex6 kernel: [55610.629841]  [<ffffffff814bd171>]
> tcp_keepalive_timer+0x11/0x250
> Aug 23 11:51:46 ex6 kernel: [55610.629850]  [<ffffffff81053ac1>]
> run_timer_softirq+0x151/0x350
> Aug 23 11:51:46 ex6 kernel: [55610.629857]  [<ffffffff8104be2e>]
> __do_softirq+0xbe/0x1f0
> Aug 23 11:51:46 ex6 kernel: [55610.629865]  [<ffffffff8156b7ec>]
> call_softirq+0x1c/0x30
> Aug 23 11:51:46 ex6 kernel: [55610.629871]  [<ffffffff810045a5>]
> do_softirq+0x75/0xb0
> Aug 23 11:51:46 ex6 kernel: [55610.629879]  [<ffffffff8104c1e5>]
> irq_exit+0xa5/0xb0
> Aug 23 11:51:46 ex6 kernel: [55610.629886]  [<ffffffff81024e98>]
> smp_apic_timer_interrupt+0x68/0xa0
> Aug 23 11:51:46 ex6 kernel: [55610.629893]  [<ffffffff8156b0fa>]
> apic_timer_interrupt+0x6a/0x70
> Aug 23 11:51:46 ex6 kernel: [55610.629902]  [<ffffffff813303cc>]
> intel_idle+0xec/0x160
> Aug 23 11:51:46 ex6 kernel: [55610.629911]  [<ffffffff8143566d>]
> cpuidle_idle_call+0x9d/0x240
> Aug 23 11:51:46 ex6 kernel: [55610.629918]  [<ffffffff8100b715>]
> cpu_idle+0x65/0xd0
> Aug 23 11:51:46 ex6 kernel: [55610.629925]  [<ffffffff81550547>]
> start_secondary+0x1fe/0x203
> Aug 23 11:51:46 ex6 kernel: [55610.629929] Code: 90 90 90 90 90 90 90 90
> 90 90 90 90 90 90 b8 00 00 01 00 f0 0f c1 07 89 c2 c1 ea 10 66 39 c2 74
> 0f 0f 1f 44 00 00 f3 90 0f b7 07 <66> 39 d0 75 f6 c3 66 66 66 66 2e 0f
> 1f 84 00 00 00 00 00 66 83
> Aug 23 11:51:46 ex6 kernel: [55610.629976] NMI backtrace for cpu 2
> Aug 23 11:51:46 ex6 kernel: [55610.629979] CPU 2
> Aug 23 11:51:46 ex6 kernel: [55610.629983] Pid: 0, comm: swapper/2 Not
> tainted 3.6.0-rc2-1-default #1 System manufacturer System Product
> Name/P8B WS
> Aug 23 11:51:46 ex6 kernel: [55610.629986] RIP:
> 0010:[<ffffffff8133039a>]  [<ffffffff8133039a>] intel_idle+0xba/0x160
> Aug 23 11:51:46 ex6 kernel: [55610.629992] RSP: 0018:ffff88040ababe78
> EFLAGS: 00000046
> Aug 23 11:51:46 ex6 kernel: [55610.629994] RAX: 0000000000000020 RBX:
> 0000000000000008 RCX: 0000000000000001
> Aug 23 11:51:46 ex6 kernel: [55610.629997] RDX: 0000000000000000 RSI:
> ffff88040ababfd8 RDI: ffffffff81a17640
> Aug 23 11:51:46 ex6 kernel: [55610.629999] RBP: 0000000000000003 R08:
> 0000000000000003 R09: 0000000000003e3c
> Aug 23 11:51:46 ex6 kernel: [55610.630002] R10: 0000000000000001 R11:
> 0000000000000000 R12: ffff88041f298f70
> Aug 23 11:51:46 ex6 kernel: [55610.630004] R13: 0000000000000020 R14:
> 12acf11f7efbdbfc R15: 0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.630007] FS:  0000000000000000(0000)
> GS:ffff88041f280000(0000) knlGS:0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.630010] CS:  0010 DS: 0000 ES: 0000
> CR0: 000000008005003b
> Aug 23 11:51:46 ex6 kernel: [55610.630012] CR2: 00007fa566135010 CR3:
> 0000000001a0c000 CR4: 00000000000407e0
> Aug 23 11:51:46 ex6 kernel: [55610.630015] DR0: 0000000000000000 DR1:
> 0000000000000000 DR2: 0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.630017] DR3: 0000000000000000 DR6:
> 00000000ffff0ff0 DR7: 0000000000000400
> Aug 23 11:51:46 ex6 kernel: [55610.630020] Process swapper/2 (pid: 0,
> threadinfo ffff88040abaa000, task ffff88040aba82c0)
> Aug 23 11:51:46 ex6 kernel: [55610.630022] Stack:
> Aug 23 11:51:46 ex6 kernel: [55610.630024]  0000000077359400
> ffffffff81436a70 0000000000000000 0000000200f31e03
> Aug 23 11:51:46 ex6 kernel: [55610.630029]  0000000000000000
> 0000000000f31e03 ffff88040ababfd8 ffff88041f298f70
> Aug 23 11:51:46 ex6 kernel: [55610.630034]  0000000000000003
> 0000000000000002 ffffffff81a52300 ffffffff8143566d
> Aug 23 11:51:46 ex6 kernel: [55610.630039] Call Trace:
> Aug 23 11:51:46 ex6 kernel: [55610.630048]  [<ffffffff8143566d>]
> cpuidle_idle_call+0x9d/0x240
> Aug 23 11:51:46 ex6 kernel: [55610.630055]  [<ffffffff8100b715>]
> cpu_idle+0x65/0xd0
> Aug 23 11:51:46 ex6 kernel: [55610.630062]  [<ffffffff81550547>]
> start_secondary+0x1fe/0x203
> Aug 23 11:51:46 ex6 kernel: [55610.630066] Code: 28 e0 ff ff 83 e2 08 75
> 22 31 d2 48 83 c0 10 48 89 d1 0f 01 c8 0f ae f0 48 8b 86 38 e0 ff ff a8
> 08 75 08 b1 01 4c 89 e8 0f 01 c9 <e8> e1 f9 d5 ff 48 89 c7 4c 29 f7 e8
> 76 a8 d1 ff 48 89 04 24 48
> Aug 23 11:51:46 ex6 kernel: [55610.630113] NMI backtrace for cpu 5
> Aug 23 11:51:46 ex6 kernel: [55610.630115] CPU 5
> Aug 23 11:51:46 ex6 kernel: [55610.630120] Pid: 0, comm: swapper/5 Not
> tainted 3.6.0-rc2-1-default #1 System manufacturer System Product
> Name/P8B WS
> Aug 23 11:51:46 ex6 kernel: [55610.630122] RIP:
> 0010:[<ffffffff8133039a>]  [<ffffffff8133039a>] intel_idle+0xba/0x160
> Aug 23 11:51:46 ex6 kernel: [55610.630128] RSP: 0018:ffff88040abb9e78
> EFLAGS: 00000046
> Aug 23 11:51:46 ex6 kernel: [55610.630130] RAX: 0000000000000020 RBX:
> 0000000000000008 RCX: 0000000000000001
> Aug 23 11:51:46 ex6 kernel: [55610.630133] RDX: 0000000000000000 RSI:
> ffff88040abb9fd8 RDI: ffffffff81a17640
> Aug 23 11:51:46 ex6 kernel: [55610.630135] RBP: 0000000000000003 R08:
> 0000000000000003 R09: 0000000000005634
> Aug 23 11:51:46 ex6 kernel: [55610.630138] R10: 0000000000000001 R11:
> 0000000000000000 R12: ffff88041f358f70
> Aug 23 11:51:46 ex6 kernel: [55610.630140] R13: 0000000000000020 R14:
> 12acf11f7e9e3c16 R15: 0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.630143] FS:  0000000000000000(0000)
> GS:ffff88041f340000(0000) knlGS:0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.630146] CS:  0010 DS: 0000 ES: 0000
> CR0: 000000008005003b
> Aug 23 11:51:46 ex6 kernel: [55610.630149] CR2: 00007fd29bfff000 CR3:
> 0000000001a0c000 CR4: 00000000000407e0
> Aug 23 11:51:46 ex6 kernel: [55610.630151] DR0: 0000000000000000 DR1:
> 0000000000000000 DR2: 0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.630154] DR3: 0000000000000000 DR6:
> 00000000ffff0ff0 DR7: 0000000000000400
> Aug 23 11:51:46 ex6 kernel: [55610.630157] Process swapper/5 (pid: 0,
> threadinfo ffff88040abb8000, task ffff88040abb6380)
> Aug 23 11:51:46 ex6 kernel: [55610.630158] Stack:
> Aug 23 11:51:46 ex6 kernel: [55610.630160]  0000000077359400
> ffffffff81436a70 0000000000000000 000000050150be3d
> Aug 23 11:51:46 ex6 kernel: [55610.630165]  0000000000000000
> 000000000150be3d ffff88040abb9fd8 ffff88041f358f70
> Aug 23 11:51:46 ex6 kernel: [55610.630170]  0000000000000003
> 0000000000000005 ffffffff81a52300 ffffffff8143566d
> Aug 23 11:51:46 ex6 kernel: [55610.630176] Call Trace:
> Aug 23 11:51:46 ex6 kernel: [55610.630184]  [<ffffffff8143566d>]
> cpuidle_idle_call+0x9d/0x240
> Aug 23 11:51:46 ex6 kernel: [55610.630191]  [<ffffffff8100b715>]
> cpu_idle+0x65/0xd0
> Aug 23 11:51:46 ex6 kernel: [55610.630198]  [<ffffffff81550547>]
> start_secondary+0x1fe/0x203
> Aug 23 11:51:46 ex6 kernel: [55610.630201] Code: 28 e0 ff ff 83 e2 08 75
> 22 31 d2 48 83 c0 10 48 89 d1 0f 01 c8 0f ae f0 48 8b 86 38 e0 ff ff a8
> 08 75 08 b1 01 4c 89 e8 0f 01 c9 <e8> e1 f9 d5 ff 48 89 c7 4c 29 f7 e8
> 76 a8 d1 ff 48 89 04 24 48
> Aug 23 11:51:46 ex6 kernel: [55610.630248] NMI backtrace for cpu 3
> Aug 23 11:51:46 ex6 kernel: [55610.630251] CPU 3
> Aug 23 11:51:46 ex6 kernel: [55610.630255] Pid: 0, comm: swapper/3 Not
> tainted 3.6.0-rc2-1-default #1 System manufacturer System Product
> Name/P8B WS
> Aug 23 11:51:46 ex6 kernel: [55610.630257] RIP:
> 0010:[<ffffffff8133039a>]  [<ffffffff8133039a>] intel_idle+0xba/0x160
> Aug 23 11:51:46 ex6 kernel: [55610.630263] RSP: 0018:ffff88040abb1e78
> EFLAGS: 00000046
> Aug 23 11:51:46 ex6 kernel: [55610.630266] RAX: 0000000000000020 RBX:
> 0000000000000008 RCX: 0000000000000001
> Aug 23 11:51:46 ex6 kernel: [55610.630268] RDX: 0000000000000000 RSI:
> ffff88040abb1fd8 RDI: ffffffff81a17640
> Aug 23 11:51:46 ex6 kernel: [55610.630271] RBP: 0000000000000003 R08:
> 0000000000000003 R09: 0000000000003e43
> Aug 23 11:51:46 ex6 kernel: [55610.630273] R10: 0000000000000001 R11:
> 0000000000000000 R12: ffff88041f2d8f70
> Aug 23 11:51:46 ex6 kernel: [55610.630276] R13: 0000000000000020 R14:
> 12acf11f7efbc356 R15: 0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.630279] FS:  0000000000000000(0000)
> GS:ffff88041f2c0000(0000) knlGS:0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.630282] CS:  0010 DS: 0000 ES: 0000
> CR0: 000000008005003b
> Aug 23 11:51:46 ex6 kernel: [55610.630284] CR2: 00007fe7d784ba68 CR3:
> 0000000001a0c000 CR4: 00000000000407e0
> Aug 23 11:51:46 ex6 kernel: [55610.630287] DR0: 0000000000000000 DR1:
> 0000000000000000 DR2: 0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.630289] DR3: 0000000000000000 DR6:
> 00000000ffff0ff0 DR7: 0000000000000400
> Aug 23 11:51:46 ex6 kernel: [55610.630292] Process swapper/3 (pid: 0,
> threadinfo ffff88040abb0000, task ffff88040abae300)
> Aug 23 11:51:46 ex6 kernel: [55610.630294] Stack:
> Aug 23 11:51:46 ex6 kernel: [55610.630296]  0000000077359400
> ffffffff81436a70 0000000000000000 0000000300f3366a
> Aug 23 11:51:46 ex6 kernel: [55610.630301]  0000000000000000
> 0000000000f3366a ffff88040abb1fd8 ffff88041f2d8f70
> Aug 23 11:51:46 ex6 kernel: [55610.630306]  0000000000000003
> 0000000000000003 ffffffff81a52300 ffffffff8143566d
> Aug 23 11:51:46 ex6 kernel: [55610.630311] Call Trace:
> Aug 23 11:51:46 ex6 kernel: [55610.630320]  [<ffffffff8143566d>]
> cpuidle_idle_call+0x9d/0x240
> Aug 23 11:51:46 ex6 kernel: [55610.630327]  [<ffffffff8100b715>]
> cpu_idle+0x65/0xd0
> Aug 23 11:51:46 ex6 kernel: [55610.630333]  [<ffffffff81550547>]
> start_secondary+0x1fe/0x203
> Aug 23 11:51:46 ex6 kernel: [55610.630337] Code: 28 e0 ff ff 83 e2 08 75
> 22 31 d2 48 83 c0 10 48 89 d1 0f 01 c8 0f ae f0 48 8b 86 38 e0 ff ff a8
> 08 75 08 b1 01 4c 89 e8 0f 01 c9 <e8> e1 f9 d5 ff 48 89 c7 4c 29 f7 e8
> 76 a8 d1 ff 48 89 04 24 48
> Aug 23 11:51:46 ex6 kernel: [55610.630385] NMI backtrace for cpu 0
> Aug 23 11:51:46 ex6 kernel: [55610.630388] CPU 0
> Aug 23 11:51:46 ex6 kernel: [55610.630393] Pid: 0, comm: swapper/0 Not
> tainted 3.6.0-rc2-1-default #1 System manufacturer System Product
> Name/P8B WS
> Aug 23 11:51:46 ex6 kernel: [55610.630396] RIP:
> 0010:[<ffffffff8133039a>]  [<ffffffff8133039a>] intel_idle+0xba/0x160
> Aug 23 11:51:46 ex6 kernel: [55610.630403] RSP: 0018:ffffffff81a01e88
> EFLAGS: 00000046
> Aug 23 11:51:46 ex6 kernel: [55610.630406] RAX: 0000000000000020 RBX:
> 0000000000000008 RCX: 0000000000000001
> Aug 23 11:51:46 ex6 kernel: [55610.630409] RDX: 0000000000000000 RSI:
> ffffffff81a01fd8 RDI: ffffffff81a17640
> Aug 23 11:51:46 ex6 kernel: [55610.630411] RBP: 0000000000000003 R08:
> 0000000000000003 R09: 0000000000005d52
> Aug 23 11:51:46 ex6 kernel: [55610.630413] R10: 0000000000000001 R11:
> 0000000000000000 R12: ffff88041f218f70
> Aug 23 11:51:46 ex6 kernel: [55610.630416] R13: 0000000000000020 R14:
> 12acf11f7f769680 R15: 0000000001fe8018
> Aug 23 11:51:46 ex6 kernel: [55610.630419] FS:  0000000000000000(0000)
> GS:ffff88041f200000(0000) knlGS:0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.630422] CS:  0010 DS: 0000 ES: 0000
> CR0: 000000008005003b
> Aug 23 11:51:46 ex6 kernel: [55610.630425] CR2: 00007f03abb83000 CR3:
> 0000000001a0c000 CR4: 00000000000407f0
> Aug 23 11:51:46 ex6 kernel: [55610.630427] DR0: 0000000000000000 DR1:
> 0000000000000000 DR2: 0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.630430] DR3: 0000000000000000 DR6:
> 00000000ffff0ff0 DR7: 0000000000000400
> Aug 23 11:51:46 ex6 kernel: [55610.630433] Process swapper/0 (pid: 0,
> threadinfo ffffffff81a00000, task ffffffff81a14420)
> Aug 23 11:51:46 ex6 kernel: [55610.630435] Stack:
> Aug 23 11:51:46 ex6 kernel: [55610.630436]  0000000077359400
> ffffffff81436a70 0000000000000000 00000000016c88d5
> Aug 23 11:51:46 ex6 kernel: [55610.630442]  0000000000000000
> 00000000016c88d5 ffffffff81a01fd8 ffff88041f218f70
> Aug 23 11:51:46 ex6 kernel: [55610.630447]  0000000000000003
> 0000000000000000 ffffffff81a52300 ffffffff8143566d
> Aug 23 11:51:46 ex6 kernel: [55610.630453] Call Trace:
> Aug 23 11:51:46 ex6 kernel: [55610.630464]  [<ffffffff8143566d>]
> cpuidle_idle_call+0x9d/0x240
> Aug 23 11:51:46 ex6 kernel: [55610.630471]  [<ffffffff8100b715>]
> cpu_idle+0x65/0xd0
> Aug 23 11:51:46 ex6 kernel: [55610.630480]  [<ffffffff81ac0ba2>]
> start_kernel+0x391/0x39c
> Aug 23 11:51:46 ex6 kernel: [55610.630488]  [<ffffffff81ac0436>]
> x86_64_start_kernel+0x105/0x114
> Aug 23 11:51:46 ex6 kernel: [55610.630492] Code: 28 e0 ff ff 83 e2 08 75
> 22 31 d2 48 83 c0 10 48 89 d1 0f 01 c8 0f ae f0 48 8b 86 38 e0 ff ff a8
> 08 75 08 b1 01 4c 89 e8 0f 01 c9 <e8> e1 f9 d5 ff 48 89 c7 4c 29 f7 e8
> 76 a8 d1 ff 48 89 04 24 48
> Aug 23 11:51:46 ex6 kernel: [55610.630539] NMI backtrace for cpu 4
> Aug 23 11:51:46 ex6 kernel: [55610.630542] CPU 4
> Aug 23 11:51:46 ex6 kernel: [55610.630546] Pid: 0, comm: swapper/4 Not
> tainted 3.6.0-rc2-1-default #1 System manufacturer System Product
> Name/P8B WS
> Aug 23 11:51:46 ex6 kernel: [55610.630549] RIP:
> 0010:[<ffffffff8133039a>]  [<ffffffff8133039a>] intel_idle+0xba/0x160
> Aug 23 11:51:46 ex6 kernel: [55610.630555] RSP: 0018:ffff88040abb5e78
> EFLAGS: 00000046
> Aug 23 11:51:46 ex6 kernel: [55610.630557] RAX: 0000000000000020 RBX:
> 0000000000000008 RCX: 0000000000000001
> Aug 23 11:51:46 ex6 kernel: [55610.630560] RDX: 0000000000000000 RSI:
> ffff88040abb5fd8 RDI: ffffffff81a17640
> Aug 23 11:51:46 ex6 kernel: [55610.630562] RBP: 0000000000000003 R08:
> 0000000000000003 R09: 0000000000003e1e
> Aug 23 11:51:46 ex6 kernel: [55610.630565] R10: 0000000000000001 R11:
> 0000000000000000 R12: ffff88041f318f70
> Aug 23 11:51:46 ex6 kernel: [55610.630568] R13: 0000000000000020 R14:
> 12acf11f7efc52d2 R15: 0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.630571] FS:  0000000000000000(0000)
> GS:ffff88041f300000(0000) knlGS:0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.630573] CS:  0010 DS: 0000 ES: 0000
> CR0: 000000008005003b
> Aug 23 11:51:46 ex6 kernel: [55610.630576] CR2: 00007fd29bfff000 CR3:
> 0000000001a0c000 CR4: 00000000000407e0
> Aug 23 11:51:46 ex6 kernel: [55610.630578] DR0: 0000000000000000 DR1:
> 0000000000000000 DR2: 0000000000000000
> Aug 23 11:51:46 ex6 kernel: [55610.630581] DR3: 0000000000000000 DR6:
> 00000000ffff0ff0 DR7: 0000000000000400
> Aug 23 11:51:46 ex6 kernel: [55610.630584] Process swapper/4 (pid: 0,
> threadinfo ffff88040abb4000, task ffff88040abb2340)
> Aug 23 11:51:46 ex6 kernel: [55610.630586] Stack:
> Aug 23 11:51:46 ex6 kernel: [55610.630588]  0000000077359400
> ffffffff81436a70 0000000000000000 0000000400f2a60d
> Aug 23 11:51:46 ex6 kernel: [55610.630593]  0000000000000000
> 0000000000f2a60d ffff88040abb5fd8 ffff88041f318f70
> Aug 23 11:51:46 ex6 kernel: [55610.630598]  0000000000000003
> 0000000000000004 ffffffff81a52300 ffffffff8143566d
> Aug 23 11:51:46 ex6 kernel: [55610.630604] Call Trace:
> Aug 23 11:51:46 ex6 kernel: [55610.630614]  [<ffffffff8143566d>]
> cpuidle_idle_call+0x9d/0x240
> Aug 23 11:51:46 ex6 kernel: [55610.630622]  [<ffffffff8100b715>]
> cpu_idle+0x65/0xd0
> Aug 23 11:51:46 ex6 kernel: [55610.630629]  [<ffffffff81550547>]
> start_secondary+0x1fe/0x203
> Aug 23 11:51:46 ex6 kernel: [55610.630633] Code: 28 e0 ff ff 83 e2 08 75
> 22 31 d2 48 83 c0 10 48 89 d1 0f 01 c8 0f ae f0 48 8b 86 38 e0 ff ff a8
> 08 75 08 b1 01 4c 89 e8 0f 01 c9 <e8> e1 f9 d5 ff 48 89 c7 4c 29 f7 e8
> 76 a8 d1 ff 48 89 04 24 48
> 
> > Aug 23 11:51:46 ex6 kernel: [55610.629820]  ffffffff81053ac1 0000000000000000 ffff88041f243ea0 ffff88040aba7fd8
> > Aug 23 11:51:46 ex6 kernel: [55610.629825]  ffff88040aba7fd8 ffff88040aba7fd8 ffff88040abd5028 ffff88041f243ea0
> > Aug 23 11:51:46 ex6 kernel: [55610.629831] Call Trace:
> > Aug 23 11:51:46 ex6 kernel: [55610.629841]  [<ffffffff814bd171>] tcp_keepalive_timer+0x11/0x250
> > Aug 23 11:51:46 ex6 kernel: [55610.629850]  [<ffffffff81053ac1>] run_timer_softirq+0x151/0x350
> > Aug 23 11:51:46 ex6 kernel: [55610.629857]  [<ffffffff8104be2e>] __do_softirq+0xbe/0x1f0
> > Aug 23 11:51:46 ex6 kernel: [55610.629865]  [<ffffffff8156b7ec>] call_softirq+0x1c/0x30
> > Aug 23 11:51:46 ex6 kernel: [55610.629871]  [<ffffffff810045a5>] do_softirq+0x75/0xb0
> > Aug 23 11:51:46 ex6 kernel: [55610.629879]  [<ffffffff8104c1e5>] irq_exit+0xa5/0xb0
> > Aug 23 11:51:46 ex6 kernel: [55610.629886]  [<ffffffff81024e98>] smp_apic_timer_interrupt+0x68/0xa0
> > Aug 23 11:51:46 ex6 kernel: [55610.629893]  [<ffffffff8156b0fa>] apic_timer_interrupt+0x6a/0x70
> > Aug 23 11:51:46 ex6 kernel: [55610.629902]  [<ffffffff813303cc>] intel_idle+0xec/0x160
> > Aug 23 11:51:46 ex6 kernel: [55610.629911]  [<ffffffff8143566d>] cpuidle_idle_call+0x9d/0x240
> > Aug 23 11:51:46 ex6 kernel: [55610.629918]  [<ffffffff8100b715>] cpu_idle+0x65/0xd0
> > Aug 23 11:51:46 ex6 kernel: [55610.629925]  [<ffffffff81550547>] start_secondary+0x1fe/0x203
> > Aug 23 11:51:46 ex6 kernel: [55610.629929] Code: 90 90 90 90 90 90 90 90 90 90 90 90 90 90 b8 00 00 01 00 f0 0f c1 07 89 c2 c1 ea 10 66 39 c2 74 0f 0f 1f 44 00 00 f3 90 0f b7 07 <66> 39 d0 75 f6 c3 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 66 83 
> > Aug 23 11:51:46 ex6 kernel: [55610.629976] NMI backtrace for cpu 2
> > Aug 23 11:51:46 ex6 kernel: [55610.629979] CPU 2 
> > Aug 23 11:51:46 ex6 kernel: [55610.629983] Pid: 0, comm: swapper/2 Not tainted 3.6.0-rc2-1-default #1 System manufacturer System Product Name/P8B WS
> > Aug 23 11:51:46 ex6 kernel: [55610.629986] RIP: 0010:[<ffffffff8133039a>]  [<ffffffff8133039a>] intel_idle+0xba/0x160
> > Aug 23 11:51:46 ex6 kernel: [55610.629992] RSP: 0018:ffff88040ababe78  EFLAGS: 00000046
> > Aug 23 11:51:46 ex6 kernel: [55610.629994] RAX: 0000000000000020 RBX: 0000000000000008 RCX: 0000000000000001
> > Aug 23 11:51:46 ex6 kernel: [55610.629997] RDX: 0000000000000000 RSI: ffff88040ababfd8 RDI: ffffffff81a17640
> > Aug 23 11:51:46 ex6 kernel: [55610.629999] RBP: 0000000000000003 R08: 0000000000000003 R09: 0000000000003e3c
> > Aug 23 11:51:46 ex6 kernel: [55610.630002] R10: 0000000000000001 R11: 0000000000000000 R12: ffff88041f298f70
> > Aug 23 11:51:46 ex6 kernel: [55610.630004] R13: 0000000000000020 R14: 12acf11f7efbdbfc R15: 0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.630007] FS:  0000000000000000(0000) GS:ffff88041f280000(0000) knlGS:0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.630010] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> > Aug 23 11:51:46 ex6 kernel: [55610.630012] CR2: 00007fa566135010 CR3: 0000000001a0c000 CR4: 00000000000407e0
> > Aug 23 11:51:46 ex6 kernel: [55610.630015] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.630017] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> > Aug 23 11:51:46 ex6 kernel: [55610.630020] Process swapper/2 (pid: 0, threadinfo ffff88040abaa000, task ffff88040aba82c0)
> > Aug 23 11:51:46 ex6 kernel: [55610.630022] Stack:
> > Aug 23 11:51:46 ex6 kernel: [55610.630024]  0000000077359400 ffffffff81436a70 0000000000000000 0000000200f31e03
> > Aug 23 11:51:46 ex6 kernel: [55610.630029]  0000000000000000 0000000000f31e03 ffff88040ababfd8 ffff88041f298f70
> > Aug 23 11:51:46 ex6 kernel: [55610.630034]  0000000000000003 0000000000000002 ffffffff81a52300 ffffffff8143566d
> > Aug 23 11:51:46 ex6 kernel: [55610.630039] Call Trace:
> > Aug 23 11:51:46 ex6 kernel: [55610.630048]  [<ffffffff8143566d>] cpuidle_idle_call+0x9d/0x240
> > Aug 23 11:51:46 ex6 kernel: [55610.630055]  [<ffffffff8100b715>] cpu_idle+0x65/0xd0
> > Aug 23 11:51:46 ex6 kernel: [55610.630062]  [<ffffffff81550547>] start_secondary+0x1fe/0x203
> > Aug 23 11:51:46 ex6 kernel: [55610.630066] Code: 28 e0 ff ff 83 e2 08 75 22 31 d2 48 83 c0 10 48 89 d1 0f 01 c8 0f ae f0 48 8b 86 38 e0 ff ff a8 08 75 08 b1 01 4c 89 e8 0f 01 c9 <e8> e1 f9 d5 ff 48 89 c7 4c 29 f7 e8 76 a8 d1 ff 48 89 04 24 48 
> > Aug 23 11:51:46 ex6 kernel: [55610.630113] NMI backtrace for cpu 5
> > Aug 23 11:51:46 ex6 kernel: [55610.630115] CPU 5 
> > Aug 23 11:51:46 ex6 kernel: [55610.630120] Pid: 0, comm: swapper/5 Not tainted 3.6.0-rc2-1-default #1 System manufacturer System Product Name/P8B WS
> > Aug 23 11:51:46 ex6 kernel: [55610.630122] RIP: 0010:[<ffffffff8133039a>]  [<ffffffff8133039a>] intel_idle+0xba/0x160
> > Aug 23 11:51:46 ex6 kernel: [55610.630128] RSP: 0018:ffff88040abb9e78  EFLAGS: 00000046
> > Aug 23 11:51:46 ex6 kernel: [55610.630130] RAX: 0000000000000020 RBX: 0000000000000008 RCX: 0000000000000001
> > Aug 23 11:51:46 ex6 kernel: [55610.630133] RDX: 0000000000000000 RSI: ffff88040abb9fd8 RDI: ffffffff81a17640
> > Aug 23 11:51:46 ex6 kernel: [55610.630135] RBP: 0000000000000003 R08: 0000000000000003 R09: 0000000000005634
> > Aug 23 11:51:46 ex6 kernel: [55610.630138] R10: 0000000000000001 R11: 0000000000000000 R12: ffff88041f358f70
> > Aug 23 11:51:46 ex6 kernel: [55610.630140] R13: 0000000000000020 R14: 12acf11f7e9e3c16 R15: 0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.630143] FS:  0000000000000000(0000) GS:ffff88041f340000(0000) knlGS:0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.630146] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> > Aug 23 11:51:46 ex6 kernel: [55610.630149] CR2: 00007fd29bfff000 CR3: 0000000001a0c000 CR4: 00000000000407e0
> > Aug 23 11:51:46 ex6 kernel: [55610.630151] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.630154] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> > Aug 23 11:51:46 ex6 kernel: [55610.630157] Process swapper/5 (pid: 0, threadinfo ffff88040abb8000, task ffff88040abb6380)
> > Aug 23 11:51:46 ex6 kernel: [55610.630158] Stack:
> > Aug 23 11:51:46 ex6 kernel: [55610.630160]  0000000077359400 ffffffff81436a70 0000000000000000 000000050150be3d
> > Aug 23 11:51:46 ex6 kernel: [55610.630165]  0000000000000000 000000000150be3d ffff88040abb9fd8 ffff88041f358f70
> > Aug 23 11:51:46 ex6 kernel: [55610.630170]  0000000000000003 0000000000000005 ffffffff81a52300 ffffffff8143566d
> > Aug 23 11:51:46 ex6 kernel: [55610.630176] Call Trace:
> > Aug 23 11:51:46 ex6 kernel: [55610.630184]  [<ffffffff8143566d>] cpuidle_idle_call+0x9d/0x240
> > Aug 23 11:51:46 ex6 kernel: [55610.630191]  [<ffffffff8100b715>] cpu_idle+0x65/0xd0
> > Aug 23 11:51:46 ex6 kernel: [55610.630198]  [<ffffffff81550547>] start_secondary+0x1fe/0x203
> > Aug 23 11:51:46 ex6 kernel: [55610.630201] Code: 28 e0 ff ff 83 e2 08 75 22 31 d2 48 83 c0 10 48 89 d1 0f 01 c8 0f ae f0 48 8b 86 38 e0 ff ff a8 08 75 08 b1 01 4c 89 e8 0f 01 c9 <e8> e1 f9 d5 ff 48 89 c7 4c 29 f7 e8 76 a8 d1 ff 48 89 04 24 48 
> > Aug 23 11:51:46 ex6 kernel: [55610.630248] NMI backtrace for cpu 3
> > Aug 23 11:51:46 ex6 kernel: [55610.630251] CPU 3 
> > Aug 23 11:51:46 ex6 kernel: [55610.630255] Pid: 0, comm: swapper/3 Not tainted 3.6.0-rc2-1-default #1 System manufacturer System Product Name/P8B WS
> > Aug 23 11:51:46 ex6 kernel: [55610.630257] RIP: 0010:[<ffffffff8133039a>]  [<ffffffff8133039a>] intel_idle+0xba/0x160
> > Aug 23 11:51:46 ex6 kernel: [55610.630263] RSP: 0018:ffff88040abb1e78  EFLAGS: 00000046
> > Aug 23 11:51:46 ex6 kernel: [55610.630266] RAX: 0000000000000020 RBX: 0000000000000008 RCX: 0000000000000001
> > Aug 23 11:51:46 ex6 kernel: [55610.630268] RDX: 0000000000000000 RSI: ffff88040abb1fd8 RDI: ffffffff81a17640
> > Aug 23 11:51:46 ex6 kernel: [55610.630271] RBP: 0000000000000003 R08: 0000000000000003 R09: 0000000000003e43
> > Aug 23 11:51:46 ex6 kernel: [55610.630273] R10: 0000000000000001 R11: 0000000000000000 R12: ffff88041f2d8f70
> > Aug 23 11:51:46 ex6 kernel: [55610.630276] R13: 0000000000000020 R14: 12acf11f7efbc356 R15: 0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.630279] FS:  0000000000000000(0000) GS:ffff88041f2c0000(0000) knlGS:0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.630282] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> > Aug 23 11:51:46 ex6 kernel: [55610.630284] CR2: 00007fe7d784ba68 CR3: 0000000001a0c000 CR4: 00000000000407e0
> > Aug 23 11:51:46 ex6 kernel: [55610.630287] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.630289] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> > Aug 23 11:51:46 ex6 kernel: [55610.630292] Process swapper/3 (pid: 0, threadinfo ffff88040abb0000, task ffff88040abae300)
> > Aug 23 11:51:46 ex6 kernel: [55610.630294] Stack:
> > Aug 23 11:51:46 ex6 kernel: [55610.630296]  0000000077359400 ffffffff81436a70 0000000000000000 0000000300f3366a
> > Aug 23 11:51:46 ex6 kernel: [55610.630301]  0000000000000000 0000000000f3366a ffff88040abb1fd8 ffff88041f2d8f70
> > Aug 23 11:51:46 ex6 kernel: [55610.630306]  0000000000000003 0000000000000003 ffffffff81a52300 ffffffff8143566d
> > Aug 23 11:51:46 ex6 kernel: [55610.630311] Call Trace:
> > Aug 23 11:51:46 ex6 kernel: [55610.630320]  [<ffffffff8143566d>] cpuidle_idle_call+0x9d/0x240
> > Aug 23 11:51:46 ex6 kernel: [55610.630327]  [<ffffffff8100b715>] cpu_idle+0x65/0xd0
> > Aug 23 11:51:46 ex6 kernel: [55610.630333]  [<ffffffff81550547>] start_secondary+0x1fe/0x203
> > Aug 23 11:51:46 ex6 kernel: [55610.630337] Code: 28 e0 ff ff 83 e2 08 75 22 31 d2 48 83 c0 10 48 89 d1 0f 01 c8 0f ae f0 48 8b 86 38 e0 ff ff a8 08 75 08 b1 01 4c 89 e8 0f 01 c9 <e8> e1 f9 d5 ff 48 89 c7 4c 29 f7 e8 76 a8 d1 ff 48 89 04 24 48 
> > Aug 23 11:51:46 ex6 kernel: [55610.630385] NMI backtrace for cpu 0
> > Aug 23 11:51:46 ex6 kernel: [55610.630388] CPU 0 
> > Aug 23 11:51:46 ex6 kernel: [55610.630393] Pid: 0, comm: swapper/0 Not tainted 3.6.0-rc2-1-default #1 System manufacturer System Product Name/P8B WS
> > Aug 23 11:51:46 ex6 kernel: [55610.630396] RIP: 0010:[<ffffffff8133039a>]  [<ffffffff8133039a>] intel_idle+0xba/0x160
> > Aug 23 11:51:46 ex6 kernel: [55610.630403] RSP: 0018:ffffffff81a01e88  EFLAGS: 00000046
> > Aug 23 11:51:46 ex6 kernel: [55610.630406] RAX: 0000000000000020 RBX: 0000000000000008 RCX: 0000000000000001
> > Aug 23 11:51:46 ex6 kernel: [55610.630409] RDX: 0000000000000000 RSI: ffffffff81a01fd8 RDI: ffffffff81a17640
> > Aug 23 11:51:46 ex6 kernel: [55610.630411] RBP: 0000000000000003 R08: 0000000000000003 R09: 0000000000005d52
> > Aug 23 11:51:46 ex6 kernel: [55610.630413] R10: 0000000000000001 R11: 0000000000000000 R12: ffff88041f218f70
> > Aug 23 11:51:46 ex6 kernel: [55610.630416] R13: 0000000000000020 R14: 12acf11f7f769680 R15: 0000000001fe8018
> > Aug 23 11:51:46 ex6 kernel: [55610.630419] FS:  0000000000000000(0000) GS:ffff88041f200000(0000) knlGS:0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.630422] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> > Aug 23 11:51:46 ex6 kernel: [55610.630425] CR2: 00007f03abb83000 CR3: 0000000001a0c000 CR4: 00000000000407f0
> > Aug 23 11:51:46 ex6 kernel: [55610.630427] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.630430] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> > Aug 23 11:51:46 ex6 kernel: [55610.630433] Process swapper/0 (pid: 0, threadinfo ffffffff81a00000, task ffffffff81a14420)
> > Aug 23 11:51:46 ex6 kernel: [55610.630435] Stack:
> > Aug 23 11:51:46 ex6 kernel: [55610.630436]  0000000077359400 ffffffff81436a70 0000000000000000 00000000016c88d5
> > Aug 23 11:51:46 ex6 kernel: [55610.630442]  0000000000000000 00000000016c88d5 ffffffff81a01fd8 ffff88041f218f70
> > Aug 23 11:51:46 ex6 kernel: [55610.630447]  0000000000000003 0000000000000000 ffffffff81a52300 ffffffff8143566d
> > Aug 23 11:51:46 ex6 kernel: [55610.630453] Call Trace:
> > Aug 23 11:51:46 ex6 kernel: [55610.630464]  [<ffffffff8143566d>] cpuidle_idle_call+0x9d/0x240
> > Aug 23 11:51:46 ex6 kernel: [55610.630471]  [<ffffffff8100b715>] cpu_idle+0x65/0xd0
> > Aug 23 11:51:46 ex6 kernel: [55610.630480]  [<ffffffff81ac0ba2>] start_kernel+0x391/0x39c
> > Aug 23 11:51:46 ex6 kernel: [55610.630488]  [<ffffffff81ac0436>] x86_64_start_kernel+0x105/0x114
> > Aug 23 11:51:46 ex6 kernel: [55610.630492] Code: 28 e0 ff ff 83 e2 08 75 22 31 d2 48 83 c0 10 48 89 d1 0f 01 c8 0f ae f0 48 8b 86 38 e0 ff ff a8 08 75 08 b1 01 4c 89 e8 0f 01 c9 <e8> e1 f9 d5 ff 48 89 c7 4c 29 f7 e8 76 a8 d1 ff 48 89 04 24 48 
> > Aug 23 11:51:46 ex6 kernel: [55610.630539] NMI backtrace for cpu 4
> > Aug 23 11:51:46 ex6 kernel: [55610.630542] CPU 4 
> > Aug 23 11:51:46 ex6 kernel: [55610.630546] Pid: 0, comm: swapper/4 Not tainted 3.6.0-rc2-1-default #1 System manufacturer System Product Name/P8B WS
> > Aug 23 11:51:46 ex6 kernel: [55610.630549] RIP: 0010:[<ffffffff8133039a>]  [<ffffffff8133039a>] intel_idle+0xba/0x160
> > Aug 23 11:51:46 ex6 kernel: [55610.630555] RSP: 0018:ffff88040abb5e78  EFLAGS: 00000046
> > Aug 23 11:51:46 ex6 kernel: [55610.630557] RAX: 0000000000000020 RBX: 0000000000000008 RCX: 0000000000000001
> > Aug 23 11:51:46 ex6 kernel: [55610.630560] RDX: 0000000000000000 RSI: ffff88040abb5fd8 RDI: ffffffff81a17640
> > Aug 23 11:51:46 ex6 kernel: [55610.630562] RBP: 0000000000000003 R08: 0000000000000003 R09: 0000000000003e1e
> > Aug 23 11:51:46 ex6 kernel: [55610.630565] R10: 0000000000000001 R11: 0000000000000000 R12: ffff88041f318f70
> > Aug 23 11:51:46 ex6 kernel: [55610.630568] R13: 0000000000000020 R14: 12acf11f7efc52d2 R15: 0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.630571] FS:  0000000000000000(0000) GS:ffff88041f300000(0000) knlGS:0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.630573] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> > Aug 23 11:51:46 ex6 kernel: [55610.630576] CR2: 00007fd29bfff000 CR3: 0000000001a0c000 CR4: 00000000000407e0
> > Aug 23 11:51:46 ex6 kernel: [55610.630578] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > Aug 23 11:51:46 ex6 kernel: [55610.630581] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> > Aug 23 11:51:46 ex6 kernel: [55610.630584] Process swapper/4 (pid: 0, threadinfo ffff88040abb4000, task ffff88040abb2340)
> > Aug 23 11:51:46 ex6 kernel: [55610.630586] Stack:
> > Aug 23 11:51:46 ex6 kernel: [55610.630588]  0000000077359400 ffffffff81436a70 0000000000000000 0000000400f2a60d
> > Aug 23 11:51:46 ex6 kernel: [55610.630593]  0000000000000000 0000000000f2a60d ffff88040abb5fd8 ffff88041f318f70
> > Aug 23 11:51:46 ex6 kernel: [55610.630598]  0000000000000003 0000000000000004 ffffffff81a52300 ffffffff8143566d
> > Aug 23 11:51:46 ex6 kernel: [55610.630604] Call Trace:
> > Aug 23 11:51:46 ex6 kernel: [55610.630614]  [<ffffffff8143566d>] cpuidle_idle_call+0x9d/0x240
> > Aug 23 11:51:46 ex6 kernel: [55610.630622]  [<ffffffff8100b715>] cpu_idle+0x65/0xd0
> > Aug 23 11:51:46 ex6 kernel: [55610.630629]  [<ffffffff81550547>] start_secondary+0x1fe/0x203
> > Aug 23 11:51:46 ex6 kernel: [55610.630633] Code: 28 e0 ff ff 83 e2 08 75 22 31 d2 48 83 c0 10 48 89 d1 0f 01 c8 0f ae f0 48 8b 86 38 e0 ff ff a8 08 75 08 b1 01 4c 89 e8 0f 01 c9 <e8> e1 f9 d5 ff 48 89 c7 4c 29 f7 e8 76 a8 d1 ff 48 89 04 24 48 
> 
> 
> Tested kernels with the problem 3.6.RC2 from SUSE, and today's linus
> vanilla tree.
> 
> Server needs reboot. (or let's say two completely different boxes have
> the same problem)

This looks like an infinite loop in tcp_slow_start()

This could happen if tp->snd_cwnd is zero

Bug probably introduced with commit commit
9dc274151a548ffd215caecec5a8872db8799447
Author: Eric Dumazet <edumazet@google.com>
Date:   Fri Jul 20 05:02:33 2012 +0000

    tcp: fix ABC in tcp_slow_start()
    
    When/if sysctl_tcp_abc > 1, we expect to increase cwnd by 2 if the
    received ACK acknowledges more than 2*MSS bytes, in tcp_slow_start()
    
    Problem is this RFC 3465 statement is not correctly coded, as
    the while () loop increases snd_cwnd one by one.
    
    Add a new variable to avoid this off-by one error.
    
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Cc: Tom Herbert <therbert@google.com>
    Cc: Yuchung Cheng <ycheng@google.com>
    Cc: Neal Cardwell <ncardwell@google.com>
    Cc: Nandita Dukkipati <nanditad@google.com>
    Cc: John Heffner <johnwheffner@gmail.com>
    Cc: Stephen Hemminger <shemminger@vyatta.com>
    Acked-by: Yuchung Cheng <ycheng@google.com>
    Acked-by: Neal Cardwell <ncardwell@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
index 04dbd7a..4d4db16 100644
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -307,6 +307,7 @@ EXPORT_SYMBOL_GPL(tcp_is_cwnd_limited);
 void tcp_slow_start(struct tcp_sock *tp)
 {
        int cnt; /* increase in packets */
+       unsigned int delta = 0;
 
        /* RFC3465: ABC Slow start
         * Increase only after a full MSS of bytes is acked
@@ -333,9 +334,9 @@ void tcp_slow_start(struct tcp_sock *tp)
        tp->snd_cwnd_cnt += cnt;
        while (tp->snd_cwnd_cnt >= tp->snd_cwnd) {
                tp->snd_cwnd_cnt -= tp->snd_cwnd;
-               if (tp->snd_cwnd < tp->snd_cwnd_clamp)
-                       tp->snd_cwnd++;
+               delta++;
        }
+       tp->snd_cwnd = min(tp->snd_cwnd + delta, tp->snd_cwnd_clamp);
 }
 EXPORT_SYMBOL_GPL(tcp_slow_start);
 



Oh, I now see the bug, I'll send a patch asap

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox