platform-intel: fix handling of VMD drives behind PCH#276
Conversation
|
Thanks, for the patch, here some initial nits:
Do it mean that the feature is not yet available in upstream kernel? |
Yes, this feature is not yet implemented, it is going through review process at the moment. |
Exactly the same IO controller, twice? That looks wrong. Please explain. |
5a7eeca to
a13e77c
Compare
Yes, the same controller is handling both devices behind PCH and CPU and it was my idea to somehow group those devices. I was also considering solution that would avoid creating separate node for PCH domain and thus list all devices in one block. Should I explore more towards that end? |
|
I don't fully understand what's wrong with output "before this patch". I also don't fully understand the topology. IIUC some drives are directly attached tot he CPU, and others are attached to the South Bridge. Both are handled by the same controller device, though. IMO it doesn't matter much to users how a drive is connected (is there a noticeable performance difference?). I'd probably print the controller capabilities, and below it, list all drives that this controller manages. Just my €0.02, like I said I don't fully understand the architecture. |
The main problem is that before this patch, mdadm doesn't list drives as behind VMD when they are connected to PCH line. Instead there is whole new driver block 'Platform : Intel(R) Rapid Storage Technology enterprise' made. |
Yes, please. Simply, printing the same "I/O Controller:" twice looks like a bug.
The problem with this 'Intel(R) Rapid Storage Technology enterprise' is probably limited to Intel drives that are no longer produced and sold. Please double check. For other drives, simply they are not listed.
Well, then we cannot merge the feature in madm after it is merged in kernel. Experience tells that kernel folks may change their mind very last moment. Please notify us when it is merged. |
Would the feature, if merged here, cause misbhehavior if it isn't merged in the kernel? If yes, which? |
From my testing, this change should not change anything in current behavior. There is a check if there exists path in the controller for 'domain1' (which is not yet implemented and is affecting only certain platforms). If 'domain1' exists, it will create additional vmd node for it. The rest of changes are minor tweaks for places that use hardcoded path to 'domain' so its parameter instead. |
Yes, it is expand of the functionality to follow domains not sole domain. Should have no negative consequences. My concerns are about "domain1", maybe folks will decide to change the naming so we will end with never-used code. But still, if you think that it is safe to merge it earlier and eventually fix later- I have no strong objections just following general policy here. |
7fee7d5 to
ccd406a
Compare
|
Pushed a change where there is no more separate vmd node for PCH to avoid controller lame duplication during print - instead I added path to pch if it exists as a separate field in sys_dev struct. Modified output in description to reflect the change. |
ccd406a to
eacd086
Compare
VMD drives behind PCH need to be handled the same way as the drives behind CPU - detect if PCH exists and handle them just like for CPU. This new PCH domain might not be implemented yet but this patch should be backwards compatible. Signed-off-by: Gardzinski, RomanX <romanx.gardzinski@intel.com>
| enum sys_dev_type type; | ||
| char *path; | ||
| char *path_pch; | ||
| char *pci_id; |
There was a problem hiding this comment.
Frankly speaking, this is approach is opposite to the design. In mdadm we have sys_dev which should describe each individual device with unique pci_id. To me it appears that domain1 pci_id is different than domain and you are workaround that. Am I correct?
How we would support "domain2" in the future? It it not extensible.
I don't look enough detailed to suggest you the correct way of implementing it but definetelly it is not something that can be accepted without good explanation.
please also avoid platform specyfic things like "pch" in a general code. It might be reused in different context in the future.
In upcoming change, VMD will be working with PCH connected drives by assigning to them a separate domain ("domain1" as of writing this).
Currently mdadm will not see those drives as behind VMD and will list them in a separate driver incorrectly.
VMD drives behind PCH need to be handled the same way as the drives behind CPU - detect if PCH exists and detect drives on its path for the controller just like for CPU.
This new PCH domain might not be implemented yet but this patch should be backwards compatible.
Example output before this patch, ALL drives are set to be behind VMD:
On same setup after the patch: