Re: [PATCH 2/3] kernel-shark: Change the mechanism of the multi-threaded search

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2.05.20 г. 4:03 ч., Steven Rostedt wrote:
On Thu, 30 Apr 2020 22:56:37 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

On Mon, 27 Apr 2020 15:18:02 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

I would say we can apply both. What do you think?
I'll try it out and let you know.
Want to resend this patch with this change?

BTW, I had to test this on my laptop (which doesn't have 24 logical
CPUs), but was able to reproduce it with the following patch. Perhaps
we should try various numbers to make sure it works for other strange
combinations.

-- Steve

diff --git a/kernel-shark/src/KsTraceViewer.cpp b/kernel-shark/src/KsTraceViewer.cpp
index 12371ad7..6e2b5fc6 100644
--- a/kernel-shark/src/KsTraceViewer.cpp
+++ b/kernel-shark/src/KsTraceViewer.cpp
@@ -676,7 +676,7 @@ void KsTraceViewer::_setSearchIterator(int row)
void KsTraceViewer::_searchItemsMT()
  {
-	int nThreads = std::thread::hardware_concurrency();
+	int nThreads = 24; //std::thread::hardware_concurrency();
Yes, I did the same.
Y.


  	int startFrom, nRows(_proxyModel.rowCount({}));
  	std::vector<QPair<int, int>> ranges(nThreads);
  	std::vector<std::future<QList<int>>> maps;




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux