Flexible I/O Tester development
 help / color / mirror / Atom feed
* [PATCH v2] fix windows cpu count
@ 2018-11-02 17:04 Jeff Furlong
  2018-11-02 17:20 ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Furlong @ 2018-11-02 17:04 UTC (permalink / raw)
  To: fio

This patch resolves c479640d6208236744f0562b1e79535eec290e2b where the CPU count returns max possible supported CPUs, and instead returns current active CPUs.


diff --git a/os/os-windows-7.h b/os/os-windows-7.h
index f5ddb8e..0a6eaa3 100644
--- a/os/os-windows-7.h
+++ b/os/os-windows-7.h
@@ -10,7 +10,7 @@ typedef struct {
 /* Return all processors regardless of processor group */
 static inline unsigned int cpus_online(void)
 {
-	return GetMaximumProcessorCount(ALL_PROCESSOR_GROUPS);
+	return GetActiveProcessorCount(ALL_PROCESSOR_GROUPS);
 }
 
 static inline void print_mask(os_cpu_mask_t *cpumask)
@@ -104,7 +104,7 @@ static inline int mask_to_group_mask(os_cpu_mask_t *cpumask, int *processor_grou
 	cpus_offset = 0;
 	group_size = 0;
 	while (!found && group < online_groups) {
-		group_size = GetMaximumProcessorCount(group);
+		group_size = GetActiveProcessorCount(group);
 		dprint(FD_PROCESS, "group=%d group_start=%d group_size=%u search_cpu=%d\n",
 		       group, cpus_offset, group_size, search_cpu);
 		if (cpus_offset + group_size > search_cpu)
@@ -271,7 +271,7 @@ static inline int fio_getaffinity(int pid, os_cpu_mask_t *mask)
 	dprint(FD_PROCESS, "current_groups=%d group_count=%d\n",
 	       current_groups[0], group_count);
 	while (true) {
-		group_size = GetMaximumProcessorCount(group);
+		group_size = GetActiveProcessorCount(group);
 		if (group_size == 0) {
 			log_err("fio_getaffinity: error retrieving size of "
 				"processor group %d\n", group);




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] fix windows cpu count
  2018-11-02 17:04 [PATCH v2] fix windows cpu count Jeff Furlong
@ 2018-11-02 17:20 ` Jens Axboe
  2018-11-02 17:49   ` Jeff Furlong
  0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2018-11-02 17:20 UTC (permalink / raw)
  To: Jeff Furlong; +Cc: fio

On Fri, Nov 02 2018, Jeff Furlong wrote:
> This patch resolves c479640d6208236744f0562b1e79535eec290e2b where the
> CPU count returns max possible supported CPUs, and instead returns
> current active CPUs.

This is still broken, long lines broken up, = turned to =3D, etc. I've
fixed it up manually and applied it, please double check:

http://git.kernel.dk/cgit/fio/commit/?id=290c64f219cd22cf67a94b6c5ba74a300ddc2ed3

Note for future patches - if a patch fixes some other patch, the way to
indicate that is how I did it:

Fixes: c479640d6208 ("Merge branch 'proc_group' of https://github.com/sitsofe/fio")

But even this one isn't fully correct, since it's a merge commit, it
should have been the individual patch in that merge.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH v2] fix windows cpu count
  2018-11-02 17:20 ` Jens Axboe
@ 2018-11-02 17:49   ` Jeff Furlong
  2018-11-02 18:03     ` Jens Axboe
  2018-11-02 18:24     ` Bart Van Assche
  0 siblings, 2 replies; 6+ messages in thread
From: Jeff Furlong @ 2018-11-02 17:49 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio

Sorry about the mixup, seems my email client had some updates and is stuck in quoted printable.  I'll try to resolve.

Regards,
Jeff

-----Original Message-----
From: fio-owner@vger.kernel.org [mailto:fio-owner@vger.kernel.org] On Behalf Of Jens Axboe
Sent: Friday, November 2, 2018 10:20 AM
To: Jeff Furlong <jeff.furlong@wdc.com>
Cc: fio <fio@vger.kernel.org>
Subject: Re: [PATCH v2] fix windows cpu count

On Fri, Nov 02 2018, Jeff Furlong wrote:
> This patch resolves c479640d6208236744f0562b1e79535eec290e2b where the 
> CPU count returns max possible supported CPUs, and instead returns 
> current active CPUs.

This is still broken, long lines broken up, = turned to =3D, etc. I've fixed it up manually and applied it, please double check:

http://git.kernel.dk/cgit/fio/commit/?id=290c64f219cd22cf67a94b6c5ba74a300ddc2ed3

Note for future patches - if a patch fixes some other patch, the way to indicate that is how I did it:

Fixes: c479640d6208 ("Merge branch 'proc_group' of https://github.com/sitsofe/fio")

But even this one isn't fully correct, since it's a merge commit, it should have been the individual patch in that merge.

--
Jens Axboe



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] fix windows cpu count
  2018-11-02 17:49   ` Jeff Furlong
@ 2018-11-02 18:03     ` Jens Axboe
  2018-11-02 18:21       ` Jeff Furlong
  2018-11-02 18:24     ` Bart Van Assche
  1 sibling, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2018-11-02 18:03 UTC (permalink / raw)
  To: Jeff Furlong; +Cc: fio

On 11/2/18 11:49 AM, Jeff Furlong wrote:
> Sorry about the mixup, seems my email client had some updates and is stuck in quoted printable.  I'll try to resolve.

But did you check the committed patch? That's of more immediate urgency :-)

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH v2] fix windows cpu count
  2018-11-02 18:03     ` Jens Axboe
@ 2018-11-02 18:21       ` Jeff Furlong
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff Furlong @ 2018-11-02 18:21 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio

> But did you check the committed patch? That's of more immediate urgency :-)
Yes, I did a diff of the two diff's (diff from my patch and diff from the git commit).  Looks good.

Regards,
Jeff




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] fix windows cpu count
  2018-11-02 17:49   ` Jeff Furlong
  2018-11-02 18:03     ` Jens Axboe
@ 2018-11-02 18:24     ` Bart Van Assche
  1 sibling, 0 replies; 6+ messages in thread
From: Bart Van Assche @ 2018-11-02 18:24 UTC (permalink / raw)
  To: Jeff Furlong, Jens Axboe; +Cc: fio

On Fri, 2018-11-02 at 17:49 +0000, Jeff Furlong wrote:
> Sorry about the mixup, seems my email client had some updates and is stuck
> in quoted printable.  I'll try to resolve.

Hi Jeff,

A few months ago I documented on https://connect.wdc.com/ how to use git
send-email inside WDC. I think git send-email formats patches in the way Jens
expects them.

Bart.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-11-03  2:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-02 17:04 [PATCH v2] fix windows cpu count Jeff Furlong
2018-11-02 17:20 ` Jens Axboe
2018-11-02 17:49   ` Jeff Furlong
2018-11-02 18:03     ` Jens Axboe
2018-11-02 18:21       ` Jeff Furlong
2018-11-02 18:24     ` Bart Van Assche

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