On 5/27/20 9:41 AM, Alexander Monakov wrote: > On Wed, 27 May 2020, Guenter Roeck wrote: > >> This exchange is exactly what I was concerned about when this driver >> was first submitted. I should have known better, and I should not >> have accepted it. Right now I seriously wonder if I should revert/drop >> it. Any arguments/thoughts why I _shouldn't_ do that ? > > Let me apologize and explain my perspective. > > These AMD MSRs have been previously wired up in the turbostat tool, and > very recently another developer submitted a patch to wire up the package > energy counter MSR for use with perf. > > Unlike the above, this driver is submitted by AMD. As I have noticed a > substantial issue (sum of core counters contradicting the package counter), > I have attempted to report it in this thread. Since AMD is submitting the > code, I was hoping to get their attention to the issue, and ideally get > some explanations about how the counters work and to what extent we can > expect them to be accurate. > > I think most of the discussion about (not) ignoring initial counter > values was in part caused by misunderstanding exactly what issue I was > reporting. After all, it's not so important if the driver accurately > captures boot-time energy use, if the counters are not trustworthy. > > I don't have an answer to your question (whether you should keep the > driver). I hope you see where I'm coming from. I'm not quite aware of > the history with coretemp driver, so if all this caused you extra > headaches, I apologize for my part in the mess. > There are two opposing arguments: - The driver can not guarantee that there are no previous overflows, thus it should always start counting from 0. - The driver is in all typical and most common situations loaded when the system boots, when there have been no overflows. Therefore, it should include startup counter values to provide accurate information for those most common use cases. My prediction was that we would see endless arguments about this, with one set of people arguing one way, another set of people arguing the other way, and both being extremely passionate about it. You have already proven my point. This is a perfect lose-lose situation, with me sitting in the middle. In such situations my reaction tends to be to pull the plug. Guenter