All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: Lans Zhang <lans.zhang2008@gmail.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH V2] Fix short of nodemask array.
Date: Wed, 17 Apr 2013 03:37:35 -0400 (EDT)	[thread overview]
Message-ID: <849990288.1414874.1366184255066.JavaMail.root@redhat.com> (raw)
In-Reply-To: <516E2E6C.2000408@gmail.com>





----- Original Message -----
> From: "Lans Zhang" <lans.zhang2008@gmail.com>
> To: "Zhouping Liu" <zliu@redhat.com>, "Jan Stancek" <jstancek@redhat.com>
> Cc: "Wanlong Gao" <gaowanlong@cn.fujitsu.com>, ltp-list@lists.sourceforge.net
> Sent: Wednesday, 17 April, 2013 7:09:00 AM
> Subject: [LTP][PATCH V2] Fix short of nodemask array.
> 
> Changes since V1:
> 1. Enhance patch header.
> 2. Use BITS_PER_LONG and set_node() to simplify the logic.
> 
> In kernel, if user specified more nodes, e.g, 512 nodes, than the
> supported, e.g, 4 nodes, kernel will check if the non supported
> part, e.g, 508 nodes, is all zeroed in node bitmap. Currently, we
> are overrunning "nmask", whose length is shorter than MAXNODES,
> and where the unsupported bits should be cleared to pass the check.
> 
> Signed-off-by: Lans Zhang <lans.zhang2008@gmail.com>

Hi,

'v' should be probably dropped here, since it's not used and rest
of patch uses 2 parameters anyway:

> +static inline void set_node(unsigned long *array, unsigned int node,
> +                            unsigned int v)
> +{
> +	array[node / BITS_PER_LONG] |= 1UL << (node % BITS_PER_LONG);
> +}
> 

Other than that, it looks good to me.

Regards,
Jan

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2013-04-17  7:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17  5:09 [LTP] [PATCH V2] Fix short of nodemask array Lans Zhang
2013-04-17  7:37 ` Jan Stancek [this message]
2013-04-17  8:35   ` Lans Zhang
2013-04-17  8:56     ` Zhouping Liu
2013-04-17  9:18       ` Lans Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=849990288.1414874.1366184255066.JavaMail.root@redhat.com \
    --to=jstancek@redhat.com \
    --cc=lans.zhang2008@gmail.com \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.