On 2/1/21 13:27, Jianxiong Gao wrote: >> Why is this setting being done and undone on each IO? Wouldn't it be >> more efficient to set it once during device initialization? >> >> And more importantly, this isn't thread safe: one CPU may be setting the >> device's dma alignment mask to 0 while another CPU is expecting it to be >> NVME_CTRL_PAGE_SIZE - 1. > I was having trouble getting the OS booted when setting it once during > initialization. However when I rebased to the latest rc6 this morning it > seems to be working with setting the mask on probe. I am still testing out > and will appreciate any idea what may cause the nvme driver to fail > with a single mask. Based on the Keith's comment it needs to be completely avoided in hot path.
Did you get a chance to bisect the problem in the rc6 ? We need to know the root cause otherwise it might happen again after we add this patch.

