Your monthly plan payment is the total of your disposable income, which is the amount of one's income that is left over after deducting the debtor's allowable expenses.
This payment is distributed to creditors in the following manner: 1) Secured debts (first mortgages, car loans) are paid according to the loan terms, 2) the balance of the monthly plan payment is paid to rest of the debts according to the proportion for each remaining debt of the debt balance. In other words, if there are 3 debts totaling $100,000, and debt A is $10,000, debt B is $30,000, and debt C is $60,000, debt A would receive 10% of the balance of the monthly plan payment, debt B would receive 30%, and debt C would receive 60%. Unsecured debts do not accrue interest for the duration of the Chapter 13 Bankruptcy, and at the end of 3 - 5 years, all unsecured debt - including the second mortgage - is discharged, regardless of how much those creditors received in the plan.
In summary, if your total plan payment will be more than the payments to your second mortgage and other unsecured debt, filing a Chapter 13 would not be worth while.