There are a couple of limits on deductible mortgage interest.
The acquisition debt mortgage deduction is limited to the interest paid on $1M ($500K MFS) at any time. This limit is reduced by any grandfathered debt. Debt over this limit may qualify as home equity debt.
Refinanced debt may be considered grandfathered debt, acquisition debt, or home equity debt, depending on certain specifics. Total home equity debt in a main or second home combined is limited to the smaller of $100K ($50K MFS) or the total of each home’s FMV reduced by acquisition and grandfathered debt.
This issue gets a little complicated, and the amount of deductible mortgage interest depends on the facts and circumstances of your situation.